コード例 #1
0
        public void Update(RequestSubCategoryDTO requestSubCategoryDTO)
        {
            var requestSubCategory = new RequestSubCategory();

            requestSubCategory.Id = requestSubCategoryDTO.Id;
            requestSubCategory.RequestCategoryId     = requestSubCategoryDTO.RequestCategoryId;
            requestSubCategory.SubCategoryName       = requestSubCategoryDTO.SubCategoryName;
            _context.Entry(requestSubCategory).State = EntityState.Modified;
        }
コード例 #2
0
        public void Add(RequestSubCategoryDTO requestSubCategoryDTO)
        {
            var requestSubCategory = new RequestSubCategory();

            //requestSubCategory.Id = requestSubCategoryDTO.Id;
            requestSubCategory.RequestCategoryId = requestSubCategoryDTO.RequestCategoryId;
            requestSubCategory.SubCategoryName   = requestSubCategoryDTO.SubCategoryName;
            _context.requestSubCategories.Add(requestSubCategory);
        }