コード例 #1
0
        public async Task <IActionResult> Delete(int couponid)
        {
            try
            {
                var result = await _repos.DeleteByManagementId(couponid);

                if (result.Status != RepositoryActionStatus.Deleted)
                {
                    return(Ok(new ApiResultError("Hata Oluştu:" + result.Message)));
                }
                var dto = CouponModelFactory.CreateModelDeleteCouponDTO(result.Entity);

                return(Ok(dto));
            }
            catch (Exception ex)
            {
                return(ReturnErrorApiResult(ex));
            }
        }