I just want to ask general question for Entity Framework. When i want to update my model from database or add new item to model from database, I'm losing all my custom properties
In Example
My Sql Table
Test
Id int
TestId int
EF creates model automatically
public class Test
{
public int Id {get;set;}
public int TestId {get;set;}
}
//I want to add custom property on class
public class Test
{
public int Id {get;set;}
public int TestId {get;set;}
public string TestName {get;set;} //I added custom property
}
but when i update model, i'm losing custom properties and everytime i need to add it again and again
Do you have any solution for this?
Thanks