public int AddUser(User user) { _db.Entry(user).State = System.Data.Entity.EntityState.Added; return(_db.SaveChanges()); }
public int AddHobby(Hobby hobby) { _db.Hobbies.Add(hobby); _db.Entry(hobby).State = EntityState.Added; return(_db.SaveChanges()); }