public bool PostPackageByCategory(PackageByCategory PackageByCategory)
        {
            bool requiredField;

            requiredField = (PackageByCategory.PackageId == 0) ? true : false;
            requiredField = (PackageByCategory.CategoryId == 0)? true : false;
            return(requiredField);
        }
        public async Task <IActionResult> UpdatePackageByCategory(int id, PackageByCategory packageByCategory)
        {
            var PackageByCategory = await uow.PackageByCategoryApplication.UpdatePackageByCategory(id, packageByCategory);

            if (PackageByCategory == null)
            {
                return(BadRequest());
            }
            return(StatusCode(201));
        }
        public async Task <IActionResult> AddPackageByCategory(PackageByCategory packageByCategory)
        {
            var activit = await uow.PackageByCategoryApplication.AddPackageByCategory(packageByCategory);

            if (activit == null)
            {
                return(BadRequest());
            }
            return(Ok(activit));
        }
        public async Task <ActionResult> UpdatePackageByCategory(int id, PackageByCategory PackageByCategory)
        {
            if (id != PackageByCategory.Id)
            {
                return(null);
            }
            dc.Entry(PackageByCategory).State = EntityState.Modified;
            var res = await dc.SaveChangesAsync();

            return(new ObjectResult(res));
        }
        public async Task <IActionResult> AddPackageByCategory(PackageByCategory PackageByCategory)
        {
            var RequiredField = uow.PackageByCategoryDomainService.PostPackageByCategory(PackageByCategory);

            if (!RequiredField)
            {
                dc.PackageByCategory.Add(PackageByCategory);
                await dc.SaveChangesAsync();

                return(new ObjectResult(PackageByCategory));
            }
            return(null);
        }