Exemple #1
0
        public object CreateCategory(CategoryReq req)
        {
            Category category = new Category();

            category.CategoryID   = req.CategoryID;
            category.CategoryName = req.CategoryName;
            category.CreateDay    = req.CreateDay;
            category.Description  = req.Description;
            category.Note         = req.Note;
            return(categoryRep.Create(category));
        }
        public object CreateCategory(CategoryReq req)
        {
            //Khởi tạo giá trị
            Category category = new Category();

            //Gán giá trị
            category.CategoryId  = req.CategoryId;
            category.Name        = req.Name;
            category.Description = req.Description;
            category.CreatedDate = req.CreatedDate;
            category.Note        = req.Note;
            //Tạo giá trị và trả về
            return(_rep.Create(category));
        }