public void ResourceStarCreate() { ResourceStarService resourceStarCRUD = new ResourceStarService(); ResourceStar resourceStar = new ResourceStar(); resourceStar.ResourceStarID = Guid.NewGuid().ToString(); resourceStar.ResourceID = "f3557d62-c521-48d4-9aea-5b23095b5005"; resourceStar.ResourceType = ResourceType.PRODUCT; resourceStarCRUD.Create(resourceStar); }
public ActionResult Create(ResourceStarModel resourceStarModel) { if (ModelState.IsValid) { resourceStarModel.ResourceStarID = Guid.NewGuid().ToString(); ResourceStar resourceStar = resourceStarModel.ToEntity(); resourceStarCRUD.Create(resourceStar); return(RedirectToAction("Index")); } resourceStarModel.ResourceTypeSelectItems = getResourceTypes(); return(View(resourceStarModel)); }