Beispiel #1
0
 public async Task Load(string content)
 {
     try
     {
         var car = JsonConvert.DeserializeObject <CarEntity>(content);
         _context.Add <CarEntity>(car);
         await _context.SaveChangesAsync();
     }
     catch (Exception e)
     {
         var x = "error";
     }
 }
Beispiel #2
0
 public async Task Load(string content)
 {
     try
     {
         var car = JsonConvert.DeserializeObject <CarEntity>(content);
         _context.Add <CarEntity>(car);
         await _context.SaveChangesAsync();
     }
     catch
     {
         _logger.Log("Error while parsing or save to database for one item.");
     }
 }