Ejemplo n.º 1
0
 public void Delete <T>(T item) where T : class
 {
     _context.Remove(item);
 }
Ejemplo n.º 2
0
 public void Delete(T entity)
 {
     _logger.LogInformation($"Removing an object of type {entity.GetType()} to the context.");
     _context.Remove(entity);
 }
 //Generic Type Remove
 public void Remove <T>(T entity) where T : class
 {
     _logger.LogInformation($"object type {entity.GetType()}");
     _context.Remove(entity);
 }