예제 #1
0
        public async Task<bool> SaveChangesAsync()
        {
            _logger.LogInformation($"Attempitng to save the changes in the context");

            // Only return success if at least one row was changed
            return (await _context.SaveChangesAsync()) > 0;
        }
예제 #2
0
 public async Task SeedData()
 {
     if (!_ctx.Camps.Any())
     {
         // Add Data
         _ctx.AddRange(_sample);
         await _ctx.SaveChangesAsync();
     }
 }
예제 #3
0
 public async Task <bool> SaveAllAsync()
 {
     return((await _context.SaveChangesAsync()) > 0);
 }
예제 #4
0
 public async Task <bool> SaveChangesAsync()
 {
     // Only return success if at least one row was changed
     return((await _context.SaveChangesAsync()) > 0);
 }