In order not to lose changes every time you update an object from the database, you need to create another class file outside the .cs files. For instance:
namespace ModelCustomers
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
[DisplayName("Table Name")]
public partial class My_Class
{
}
}
Now, even if you update the object, you still have the changes from your own file.
source
share