예제 #1
0
        public async Task <IActionResult> Delete(int landlordId, int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var result = await _provider.DeleteProperty(id);

            if (!result.Value)
            {
                return(NotFound());
            }
            if (result == null)
            {
                return(StatusCode(500, "A problem occurred while handling your request."));
            }
            return(NoContent());
        }
예제 #2
0
 public bool DeleteProperty(int id)
 {
     return(_PropertyProvider.DeleteProperty(id));
 }