public async Task <IResult> DeleteStudentWithAddressAsync(int id) { var student = GetStudentByIdAsync(id); if (student == null) { return(new ErrorResult(HttpStatusCode.NotFound)); } await _studentDal.DeleteAsync(new Student { Id = id }); return(new SuccessfulResult(HttpStatusCode.OK)); }