Пример #1
0
        public void DeleteUser(User user)
        {
            CapaNavDocDal dal = new CapaNavDocDal();

            dal.Entry(user).State = EntityState.Deleted;
            dal.SaveChanges();
        }
Пример #2
0
        public User InsertUser(User user)
        {
            CapaNavDocDal dal = new CapaNavDocDal();

            dal.Users.Add(user);
            dal.SaveChanges();
            return(user);
        }
Пример #3
0
        public User UpdateUser(User user)
        {
            CapaNavDocDal dal = new CapaNavDocDal();

            dal.Entry(user).State = EntityState.Modified;
            dal.SaveChanges();
            return(user);
        }
Пример #4
0
        public List <User> GetUsers()
        {
            CapaNavDocDal dal = new CapaNavDocDal();

            return(dal.Users.ToList());
        }