Пример #1
0
        public UserView DeleteUser(int id)
        {
            User user = _organizerContext.User.Where(a => a.Id == id).Single();

            _organizerContext.Attach(user);
            user.Deleted = true;
            _organizerContext.SaveChanges();
            return(_organizerContext.User.Where(a => a.Id == user.Id).Select(a => a.MapUserToView()).Single());
        }