public IHttpActionResult GetAll() { var users = _userService.GetAll(); var models = CustomMapperPL.FromUserDtoToUserModel(users); return(Ok(models)); }
public IHttpActionResult GetByHeaderId(int id) { var messages = _messageService.GetByHeaderId(id); var model = CustomMapperPL.FromMessageDtoToMessageModel(messages); return(Ok(model)); }
public IHttpActionResult GetUsersWhoLike(int id) { var users = _publicationService.GetUsersWhoLike(id); var model = CustomMapperPL.FromUserDtoToUserModel(users); return(Ok(model)); }
public IHttpActionResult GetMessageHeadersUser() { var headers = _messageHeaderService.GetMessageHeadersByUserEmail(User.Identity.Name); var model = CustomMapperPL.FromMessageHeaderDtoToMessageHeaderModel(headers); return(Ok(model)); }
public IHttpActionResult GetFilteredUsers() { var users = _userService.GetAll(); var models = CustomMapperPL.FromUserDtoToUserModel(users).Select(user => new UserSearch() { id = user.Id, name = user.Name }).ToList(); return(Ok(new SearchResult() { results = models, total = models.Count() })); }
public IHttpActionResult GetMessageHeaderType() { var types = CustomMapperPL.FromMessageHeaderTypeDtoToMessageHeaderTypeModel(_serivce.GetMessageHeaderTypes()); return(Ok(types)); }
public IHttpActionResult GetRelationship() { var relationships = CustomMapperPL.FromRelationshipDtoToRelationshipModel(_serivce.GetRelationship()); return(Ok(relationships)); }
public IHttpActionResult GetCities() { var cities = CustomMapperPL.FromCityDtoToCityModel(_serivce.GetCity()); return(Ok(cities)); }
public IHttpActionResult GetCountries() { var countries = CustomMapperPL.FromCountryDtoToCountryModel(_serivce.GetCountry()); return(Ok(countries)); }
public IHttpActionResult GetPublicationUserMain(string id) { var publications = CustomMapperPL.FromPublicationDtoToPublicationModel(_publicationService.GetPublicationsByUserIdMain(id)); return(Ok(publications)); }
public IHttpActionResult GetMessageHeader(int id) { var header = CustomMapperPL.FromMessageHeaderDtoToMessageHeaderModel(_messageHeaderService.GetById(id), false); return(Ok(header)); }
public IHttpActionResult GetCountOfUsersInCity(string city) { var users = CustomMapperPL.FromUserDtoToUserModel(_userService.GetUsersByCity(city)); return(Ok(users)); }
public IHttpActionResult GetUser(string id) { var user = CustomMapperPL.FromUserDtoToUserModel(_userService.GetUserById(id), false); return(Ok(user)); }
public IHttpActionResult GetCurrentUser() { var user = CustomMapperPL.FromUserDtoToUserModel(_userService.GetUserByEmail(User.Identity.Name), false); return(Ok(user)); }
public IHttpActionResult GetFollowing(string id) { var users = CustomMapperPL.FromUserDtoToUserModel(_userService.GetFollowingById(id)); return(Ok(users)); }