public List <PresentationCardModel> CheckInfo(SearchModel search) { List <PresentationCardEntity> lce = ((PresentationCardRepository)_presentationCardRepository).GetFromSearch(search.DanceName, search.Level, search.Objective, search.Role, search.City); if (lce != null) { List <PresentationCardModel> lpc = new List <PresentationCardModel>(); foreach (PresentationCardEntity item in lce) { PresentationCardModel pm = new PresentationCardModel(); pm.IdUser = item.IdUser; pm.Image = item.Image; pm.DanceName = item.DanceName; pm.Level = item.Level; pm.Objective = item.Objective; pm.Role = item.Role; pm.City = item.City; pm.Comment = item.Comment; lpc.Add(pm); } return(lpc); } else { return(null); } }
public List <PresentationCardModel> GetAllCard(int IdUser) { List <PresentationCardModel> lpm = new List <PresentationCardModel>(); List <PresentationCardEntity> lpe = ((PresentationCardRepository)_presentationCardRepository).GetAllCardsByIdUser(IdUser); foreach (PresentationCardEntity item in lpe) { PresentationCardModel pm = new PresentationCardModel(); pm.Image = item.Image; pm.Nickname = item.Nickname; pm.DanceName = item.DanceName; pm.Level = item.Level; pm.Objective = item.Objective; pm.Role = item.Role; pm.City = item.City; pm.Comment = item.Comment; lpm.Add(pm); } return(lpm); }
public async Task <IViewComponentResult> InvokeAsync(PresentationCardModel model) { return(View(model)); }