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