public async Task CreateAsync(ProductDto product)
        {
            await _context.AddAsync(product.MapTo <Product>());

            await _context.SaveChangesAsync();
        }
示例#2
0
        public async Task CreateAsync(StockDto stock)
        {
            await _context.AddAsync(stock.MapTo <Stock>());

            await _context.SaveChangesAsync();
        }