public void DeleteUser(User user) { CapaNavDocDal dal = new CapaNavDocDal(); dal.Entry(user).State = EntityState.Deleted; dal.SaveChanges(); }
public User InsertUser(User user) { CapaNavDocDal dal = new CapaNavDocDal(); dal.Users.Add(user); dal.SaveChanges(); return(user); }
public User UpdateUser(User user) { CapaNavDocDal dal = new CapaNavDocDal(); dal.Entry(user).State = EntityState.Modified; dal.SaveChanges(); return(user); }
public List <User> GetUsers() { CapaNavDocDal dal = new CapaNavDocDal(); return(dal.Users.ToList()); }