2 thoughts on “How to create metadata classes for EF poco objects

  1. this is something I was looking for, but still not clear: where does the metadata class text above go? separate class file, but then there would be 2 category.cs files ?! pr it is separate as categorymetadata.cs or appended within the Db context generator’s category.cs ? dopey I know but trying this kind of model and generation for the first time.

    • The metadata class will sit in a different file. You can’t put it inside the generator’s category.cs, your codes will be overwritten when you refresh the model. You can name it differently: categoryMetaData.cs, or place it in different folder with same name “/metadata/category.cs”, but keep the namespace same and partial class of category, such as “Public partial class Category”. Hope this helps. Cheers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s