public HttpResponseMessage GetUserFollowedById(int UserId) { if (!UsuariosSeguidosHelper.IsFollowingUsers(UserId)) { throw new HttpResponseException(HttpStatusCode.NotFound); } User_Followed_User usr = UsuariosSeguidosHelper.GetUserFollowedByPrimaryKey(UserId); return(Request.CreateResponse(HttpStatusCode.OK, usr)); }
public HttpResponseMessage Save(User_Followed_User usr) { bool SuccesfullSaved = UsuariosSeguidosHelper.Save(usr); if (!SuccesfullSaved) { throw new HttpResponseException(HttpStatusCode.InternalServerError); } return(Request.CreateResponse(HttpStatusCode.Created)); }
public HttpResponseMessage GetAllUsersSeguidos() { List <User_Followed_User> Usuarios = UsuariosSeguidosHelper.GetAll(); bool TheresData = Usuarios.Count > 0; if (!TheresData) { throw new HttpResponseException(HttpStatusCode.NoContent); } return(Request.CreateResponse(HttpStatusCode.OK, Usuarios)); }