public IActionResult Create() { var model = new DocumentViewModel { Genders = _combosHelper.GetComboGenders(), Authors = _combosHelper.GetComboAuthors(), TypeOfDocuments = _combosHelper.GetComboTypeOfDocuments(), DocumentLanguages = _combosHelper.GetComboDocumentLanguages(), Date = DateTime.Now }; return(View(model)); }
public DocumentViewModel ToDocumentViewModel(DocumentEntity documentEntity) { return(new DocumentViewModel { Id = documentEntity.Id, DocumentPath = documentEntity.DocumentPath, Title = documentEntity.Title, Date = documentEntity.Date.ToLocalTime(), PagesNumber = documentEntity.PagesNumber, Summary = documentEntity.Summary, Gender = documentEntity.Gender, GenderId = documentEntity.Gender.Id, Accepted = documentEntity.Accepted, Genders = _combosHelper.GetComboGenders(), Author = documentEntity.Author, AuthorId = documentEntity.Author.Id, Authors = _combosHelper.GetComboAuthors(), TypeOfDocument = documentEntity.TypeOfDocument, TypeOfDocumentId = documentEntity.TypeOfDocument.Id, TypeOfDocuments = _combosHelper.GetComboTypeOfDocuments(), DocumentLanguage = documentEntity.DocumentLanguage, DocumentLanguageId = documentEntity.DocumentLanguage.Id, DocumentLanguages = _combosHelper.GetComboDocumentLanguages(), }); }
public IActionResult Create() { var model = new NutritionistViewModel { Genders = combosHelper.GetComboGenders() }; return(View(model)); }