コード例 #1
0
        public async Task <string> DeleteDtoClass(string id)
        {
            try
            {
                await repository.DeleteAsync(id);

                return("item deleted");
            } catch
            {
                return("fail to delete");
            }
        }
コード例 #2
0
        public async Task <string> DeleteActivity(string Id)
        {
            try
            {
                await _repository.DeleteAsync(Id);

                return("Activity Deleted");
            }
            catch
            {
                return("Activity Not Found");
            }
        }
コード例 #3
0
        public async Task <string> DeleteLesson(string id, Dictionary <string, string> pk)
        {
            var lesson = await _repository.GetByIdAsync(id, pk);

            var result = $"{id}-Deleted";;

            if (lesson == null)
            {
                result = $"{id}-Not Found";
            }
            await _repository.DeleteAsync(id, pk);

            return(result);
        }