public CreateBookViewModel BeforeCreateBook() { var tempBookModel = new CreateBookViewModel(); tempBookModel.ListGeners = new SelectList(_generRepository.Get(), "Id", "Genre"); tempBookModel.DateInsert = DateTime.Now.Date; return(tempBookModel); }
public IEnumerable <GenerViewModel> ShowAllGeners() { IEnumerable <Gener> tempGeners = _generRepository.Get(); return(Mapper.Map <IEnumerable <Gener>, List <GenerViewModel> >(tempGeners)); }