public HttpResponseMessage GetTot() { var contactes = ContactesRepository.GetAllContactes(); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, contactes); return(response); }
public HttpResponseMessage Get() { var contactes = ContactesRepository.GetAllContactes(); foreach (var c in contactes) { c.serializarEmail = false; c.serializarTelefon = false; } HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, contactes); return(response); }
public HttpResponseMessage PostCTot([FromBody] contacte c) { var contactes = ContactesRepository.GetAllContactes(); if (contactes == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } c.serializeMail = true; c.serializeTelefons = true; var co = ContactesRepository.CreateContacte(c); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, co); return(response); }
public HttpResponseMessage GetTot() { var contactes = ContactesRepository.GetAllContactes(); if (contactes == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } foreach (var c in contactes) { c.serializeMail = true; c.serializeTelefons = true; } HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, contactes); return(response); }