Ejemplo n.º 1
0
        public Task <int> Create(User user)
        {
            var encriptedPassword = _crypt.Encrypt(user.Password);

            user.Password = encriptedPassword;
            _context.Users.AddAsync(user);
            var result = _context.SaveChangesAsync();

            return(result);
        }
Ejemplo n.º 2
0
 public Task <int> Create(TicketType ticketType)
 {
     _context.TicketTypes.AddAsync(ticketType);
     return(_context.SaveChangesAsync());
 }
Ejemplo n.º 3
0
 public async Task <int> Create(Department department)
 {
     _context.Departments.Add(department);
     return(await _context.SaveChangesAsync());
 }
Ejemplo n.º 4
0
 public Task <int> Create(Category category)
 {
     _context.Categories.AddAsync(category);
     return(_context.SaveChangesAsync());
 }
Ejemplo n.º 5
0
 public Task <int> Create(PriorityType priorityType)
 {
     _context.PriorityTypes.AddAsync(priorityType);
     return(_context.SaveChangesAsync());
 }