Ejemplo n.º 1
0
 public virtual void AddRange(List <T> models, [CallerLineNumber] int lineNumber = 0, [CallerMemberName] string caller = null)
 {
     _cache?.AddRange(models);
     _dbSet.AddRange(models);
     _db.SaveChangesAsync();
     _rep?.AddRange(models);
 }
Ejemplo n.º 2
0
 public void AddRange(List <T> models, [CallerLineNumber] int lineNumber = 0, [CallerMemberName] string caller = null)
 {
     _cache?.AddRange(models);
     foreach (var i in models)
     {
         _session.Store(i);
     }
     _session.SaveChanges();
 }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="models"></param>
 /// <param name="lineNumber"></param>
 /// <param name="caller"></param>
 public void AddRange(List <T> models, [CallerLineNumber] int lineNumber = 0, [CallerMemberName] string caller = null)
 {
     _cache?.AddRange(models);
     _db.InsertMany(models);
 }