예제 #1
0
        public async Task <ActionResultResponse> Delete(string tenantId, string bannerId)
        {
            var checkExists = await _bannerRepository.CheckInfo(bannerId);

            if (!checkExists)
            {
                return(new ActionResultResponse(-1, _resourceService.GetString("Banner does not exists.")));
            }

            var result = await _bannerRepository.Delete(bannerId);

            return(new ActionResultResponse(result, result <= 0 ? _sharedResourceService.GetString("Something went wrong. Please contact with administrator.")
                : _resourceService.GetString("Delete Banner successful.")));
        }