public ListDto GetList(int id, string userId) { if (!_listRepository.IsMember(id, userId)) { return(null); } var list = _listRepository.GetList(id); var result = _mapper.Map <ListDto>(list); return(result); }
/// <summary> /// /// </summary> /// <returns></returns> public List <ListDTO> GetList(string ProjectID) { List <TblList> Lists = (List <TblList>)_listRepository.GetList(ProjectID); List <ListDTO> listsDTO = new List <ListDTO>(); foreach (TblList list in Lists) { ListDTO listdto = _mapper.Map <ListDTO>(list); listsDTO.Add(listdto); } return(listsDTO); }
public async Task <ActionResult <ListRessource> > GetList(int id, bool includeTasks = true) { try { // userName is not working ;/ var userName = this.User.Identity.Name; if (this.User.Identity.IsAuthenticated && userName != null) { var result = await _listRepository.GetList(id, true); //return _mapper.Map<ListRessource>(result); var ressource = _mapper.Map <ListRessource>(result); return(ressource); } else { return(this.StatusCode(StatusCodes.Status401Unauthorized, "Unauthorized request")); } } catch (Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure")); } }
public List <List> GetList() { return(listRepository.GetList()); }
public Result <IEnumerable <TModel> > GetList() { return(EntityToModel(Repository.GetList())); }
public override void Shutdown() { _entityLoader.WriteToFile(_localPlaylistRepository.GetList(), PlaylistFile); }
public TList GetList(string userId, int idList) { return(_listRepository.GetList(userId, idList)); }
public ToDoList GetList(int id) { return(_listRepo.GetList(id)); }