public void UpdateUser(User user) { using (var ctx = new PlatineContext()) { ctx.Entry(user).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } }
public void UpdateEducation(Education education) { using (var ctx = new PlatineContext()) { ctx.Entry(education).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } }
public void UpdateExperience(Experience experience, Guid userId) { using (var ctx = new PlatineContext()) { if (!experience.UserId.Equals(userId)) { throw new NotAllowedException(); } ctx.Entry(experience).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } }