public User Create(User inputObject) { using (GoKeyboardDbContext context = new GoKeyboardDbContext()) { context.Users.Add(inputObject); context.SaveChanges(); return inputObject; } }
public User Update(User inputObject) { using (GoKeyboardDbContext context = new GoKeyboardDbContext()) { context.Users.Attach(inputObject); context.Entry(inputObject).State = EntityState.Modified; context.SaveChanges(); return inputObject; } }