コード例 #1
0
 public void Add <T>(T entity) where T : class
 {
     _logger.LogInformation($"Adding an object of type {entity.GetType()} to the context.");
     _context.Add(entity);
 }
コード例 #2
0
 public void Add <T>(T models) where T : class
 {
     _context.Add(models);
 }
コード例 #3
0
 public void Add <T>(T entity) where T : class
 {
     _context.Add(entity);
 }