public async Task <Role> Create(Role model) { _context.Add(model); await _context.SaveChangesAsync(); return(model); }
public async Task <User> Create(User model) { // We convert the password into an SHA1 hash model.Password = Cryptography.Sha1(model.Password); _context.Add(model); await _context.SaveChangesAsync(); return(model); }