コード例 #1
0
        public HttpResponseMessage Get()
        {
            var telefons = TelefonsRepository.GetAllTelefons();
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, telefons);

            return(response);
        }
コード例 #2
0
        public HttpResponseMessage Get(string telefon)
        {
            var telefons = TelefonsRepository.SearchTelefonByName(telefon);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, telefons);

            return(response);
        }
コード例 #3
0
        public HttpResponseMessage GetContacteTot(int id)
        {
            var contacte = ContactesRepository.GetContacte(id);
            var telefon  = TelefonsRepository.GetTelefon(contacte.contacteId);

            todo = true;
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, contacte);

            return(response);
        }