public static Users AddUser(InsightConsultingDomain context,
                             Users user)
 {
     context.UsersRepository.Add(user);
     context.UsersRepository.Commit();
     return(context.UsersRepository.GetSingle(user.Id));
 }
        public static Users Delete(InsightConsultingDomain context,
                                   int id)
        {
            var user = context.UsersRepository.GetSingle(id);

            context.UsersRepository.Delete(user);
            context.UsersRepository.Commit();
            return(user);
        }
Esempio n. 3
0
 public UsersApiController(InsightConsultingDomain insightConsultingDomain)
 {
     _context = insightConsultingDomain;
 }
Esempio n. 4
0
 public UsersController(InsightConsultingDomain context)
 {
     _context           = context;
     usersApiController = new UsersApiController(_context);
 }
 public static Users GetUser(InsightConsultingDomain context, int?id)
 {
     return(context.UsersRepository.GetSingle(id));
 }
 public static IQueryable <Users> GetAll(InsightConsultingDomain context)
 {
     return(context.UsersRepository.FromSqlProc("dbo.GetAllUsers"));
 }