public Advisor Update(Advisor advisor) { var AdvisorData = context.Advisors.Attach(advisor); AdvisorData.State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); return(advisor); }
public Advisor Delete(int id) { Advisor advisor = context.Advisors.Find(id); if (advisor != null) { context.Advisors.Remove(advisor); context.SaveChanges(); } return(advisor); }
public Advisor Add(Advisor advisor) { context.Advisors.Add(advisor); context.SaveChanges(); return(advisor); }