示例#1
0
        public async Task <HttpResponseMessage> DeleteById(Guid id)
        {
            Tuple <int, string> tuple = await defaultService.RemovePersonById(id);

            if (tuple.Item1 == -1)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound, String.Format("There is no person with Id: {0}", id)));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, String.Format("{0} removed from the list", tuple.Item2)));
        }