public async Task <IEnumerable <Transaction> > GetTransac() { ListTransac = await _serviceTransac.GetAsync(); _mydbContextDB.Set <Transaction>().RemoveRange(ListTransac); await _mydbContextDB.AddRangeAsync(ListTransac); _mydbContextDB.SaveChanges(); return(ListTransac); }
public void Add(T entity) { _myDbContext.Set <T>().Add(entity); }