public void DeleteEmp(int id) { Emp item = repository.Get(id); if (item == null) { throw new System.Web.Http.HttpResponseException(HttpStatusCode.NotFound); } repository.Remove(id); }