BillableHoursWebApp.Api.Controllers.ProjectsController.Delete C# (CSharp) Метод

Delete() приватный Метод

private Delete ( int id ) : IHttpActionResult
id int
Результат IHttpActionResult
        public IHttpActionResult Delete(int id)
        {
            var result = this.data.Projects
                .Find(x => x.Id == id).FirstOrDefault();

            if (result == null)
            {
                return this.BadRequest("No project with that id is present.");
            }

            this.data.Projects.Delete(result);
            this.data.SaveChanges();

            var resultModel = Mapper.Map<ProjectResponseModel>(result);

            return this.Ok(resultModel);
        }