Esempio n. 1
0
        public async Task <Product> Create(Product pToCreate, CancellationToken c)
        {
            await _context.Products.AddAsync(pToCreate, c);

            await _context.SaveChangesAsync(c);

            return(pToCreate);
        }
Esempio n. 2
0
        public async Task <Setting> Update(Setting setting)
        {
            _context.Settings.Update(setting);
            await _context.SaveChangesAsync();

            return(setting);
        }