Beispiel #1
0
        public async Task <(int ResultAction, TagResponse DeletedEntity)> DeleteTagAsync(TagResponse tag)
        {
            if (tag == null)
            {
                return(-1, null);
            }
            var result = await _tagBaseServices.DeleteAsync(tag.TagID).ConfigureAwait(false);

            return(result.ResultAction, new TagResponse {
                TagID = result.DeletedEntity.Id, Name = result.DeletedEntity.Name
            });
        }
Beispiel #2
0
        public async Task <(int ResultAction, CategoryResponse DeletedEntity)> DeleteCategoryAsync(CategoryResponse category)
        {
            if (category == null)
            {
                return(-1, null);
            }
            var result = await _categoryBaseServices.DeleteAsync(category.CatID).ConfigureAwait(false);

            return(result.ResultAction, new CategoryResponse {
                CatID = result.DeletedEntity.Id, Name = result.DeletedEntity.Name
            });
        }