Esempio n. 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);
        }
Esempio n. 2
0
 public void Add(T entity)
 {
     _myDbContext.Set <T>().Add(entity);
 }