Пример #1
0
 public Admin AddAdmin(Admin admin)
 {
     _catalogContext.Admin.Add(admin);
     _catalogContext.SaveChanges();
     _logger.LogInformation("Added user {Id} as admin to catalog {catalogId}", admin.Id, admin.CatalogId);
     return(admin);
 }
Пример #2
0
        public async Task <bool> Commit()
        {
            var changeAmount = await _context.SaveChanges();

            return(changeAmount > 0);
        }