예제 #1
0
 public async Task CreateAsync(Role role)
 {
     if (role == null)
     {
         throw new ArgumentNullException(nameof(role));
     }
     _context.Set <Role>().Add(role);
     await _context.SaveChangesAsync();
 }
예제 #2
0
 public async Task CreateAsync(User user)
 {
     if (user == null)
     {
         throw new ArgumentNullException(nameof(user));
     }
     _context.Set <User>().Add(user);
     await _context.SaveChangesAsync();
 }