asp.net - Add custom properties to .tt POCO classes lost on updating model -


i've created 3-tier web application using entityframework database first approach. need add custom properties poco classes not exist in database. when update edmx , run custom tool tt file, classes refreshed per database , lose custom properties created.

i need such custom properties in web application only, , can't add them database. there way refresh poco classes without losing custom properties?

that's way entity works. classes refreshed when run tool. accomplish trying need add new properties or methods on different file. auto generated classes marked partial reason. here link of situation similar yours http://robbincremers.me/2012/01/31/entity-framework-using-partial-classes-to-add-business-logic-and-validation-to-generated-entities/


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -