I am working on an ASP.NET MVC 5 project, using the code-first approach for database design. I have a question about my code design.I have an Entity in my database schema called Student:public partial class Student{  public int Id { get; set; }  public string RollNumber { get; set; }  public string Name { get; set; }  public string Address { get; set; }  public string Mobile { get; set; }  public string Email { get; set; }}Notice that I have declared this as partial because I extend it and include all the data access and processing functions for a student, like this:public partial class Student{   [NotMapped]   private MyDbContext context = new MyDbContext();   public static Student Get(int id)   {     Student student;     using(MyDbContext context = new MyDbContext())     {       student = context.Students.SingleOrDefault(s => s.Id == id)     }     return student;   }   public void Student Create()   {     context.Students.Add(this);     context.SaveChanges();   }   //....   //and similarly many other}Notice that I have declared a static Get function which takes an id and returns a Student object if it exists, otherwise null. I have declared this static because it already returns a Student object, so calling it on an object seems unreasonable to me (please correct me if I am wrong). The second thing to notice is the NotMapped attribute which I've used to exclude this property from mapping to database when running migrations.I am using the above mentioned design with my all entities (i.e. wrapping data and function processing over that data into a single object).Is this design approach good? Is there any other better approach exist, or am I on the wrong path?
Student data in a database
c#;asp.net mvc 5