Exemple #1
0
        public async Task <IActionResult> DeleteHome([FromForm] long Id)
        {
            try
            {
                if (Id <= 0)
                {
                    return(StatusCode((int)System.Net.HttpStatusCode.BadRequest, "Id not found!"));
                }
                else
                {
                    var result = await _homeRepo.DeleteAsync(Id);

                    return(Ok());
                }
            }
            catch (Exception ex)
            {
                return(StatusCode((int)System.Net.HttpStatusCode.InternalServerError, ex.Message));
            }
        }