public ActionResult CreateMetadata(CreateMetadataViewModel metadata) { if (ModelState.IsValid) { var isMetadataAlreadyExist = _metadataDataProvider.IsMetadataWithThisNameAdded(metadata.Name); if (isMetadataAlreadyExist) { ModelState.AddModelError("MetadataAlreadyExist", Resources.MetadataAlreadyExist); return(View()); } _metadataService.AddMetadata(FilmViewerMapper.Mapper.Map <MetadataDto>(metadata)); TempData[UserMessages.UserMessage] = new MessageViewModel() { CssClass = "alert-success", Message = Resources.MetadataCreatedMessage }; return(RedirectToAction("CreateMetadata")); } return(View(metadata)); }
public Basic.Framework.Web.BasicResponse <Sys.Safety.DataContract.MetadataInfo> AddMetadata(Sys.Safety.Request.Metadata.MetadataAddRequest metadatarequest) { return(_service.AddMetadata(metadatarequest)); }