示例#1
0
        public int Insert(CategoryDto dto)
        {
            Category c = CategoryConversion.EntityConvert(dto);

            _context.Categories.Add(c);

            return(_context.SaveChanges());
        }
示例#2
0
        public int Insert(ProductDto dto)
        {
            Product c = ProductConversion.EntityConvert(dto);

            _context.Products.Add(c);

            return(_context.SaveChanges());
        }