예제 #1
0
        public async Task <bool> AddMasterItem(MasterItemModel model)
        {
            MasterItem item = new MasterItem()
            {
                Id    = model.Id,
                Name  = model.Name,
                Rate  = model.Rate,
                Stock = model.Stock
            };

            await _dbContext.MasterItems.AddAsync(item);

            int affectedRows = await _dbContext.SaveChangesAsync();

            return(affectedRows > 0);
        }