예제 #1
0
        public async Task <IEnumerable <Transaction> > GetTransac()
        {
            ListTransac = await _serviceTransac.GetAsync();

            _mydbContextDB.Set <Transaction>().RemoveRange(ListTransac);
            await _mydbContextDB.AddRangeAsync(ListTransac);

            _mydbContextDB.SaveChanges();
            return(ListTransac);
        }
예제 #2
0
 public void Add(T entity)
 {
     _myDbContext.Set <T>().Add(entity);
 }