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); }
public Task <int> Create(TicketType ticketType) { _context.TicketTypes.AddAsync(ticketType); return(_context.SaveChangesAsync()); }
public async Task <int> Create(Department department) { _context.Departments.Add(department); return(await _context.SaveChangesAsync()); }
public Task <int> Create(Category category) { _context.Categories.AddAsync(category); return(_context.SaveChangesAsync()); }
public Task <int> Create(PriorityType priorityType) { _context.PriorityTypes.AddAsync(priorityType); return(_context.SaveChangesAsync()); }