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