public virtual async Task <bool> DeleteMultiple(IEnumerable <long> ids)
        {
            var result = false;

            try
            {
                result = await ArtifactRepo.DeleteMultipleAsync(ids);
            }
            catch (Exception ex)
            {
                Error(ex);
            }

            return(result);
        }
        public virtual async Task <bool> UndeleteAsync(long id)
        {
            var result = false;

            try
            {
                result = await ArtifactRepo.UndeleteAsync(id);
            }
            catch (Exception ex)
            {
                Error(ex);
            }

            return(result);
        }
        public virtual async Task <bool> DeleteAsync(long id)
        {
            var result = false;

            try
            {
                var entity = ArtifactRepo.GetAsync(id);
                result = await ArtifactRepo.DeleteAsync(id);
            }
            catch (Exception ex)
            {
                Error(ex);
            }

            return(result);
        }
        public virtual async Task <TCreateDto> CreateAsync([FromBody] TCreateDto dto)
        {
            if (ModelState.IsValid)
            {
                TEntity entity = null;

                try
                {
                    entity = Mapper.Map <TEntity>(dto);
                    entity = await ArtifactRepo.CreateAsync(entity);
                }
                catch (Exception ex)
                {
                    Error(ex);
                }

                return(Mapper.Map <TCreateDto>(entity));
            }

            throw new HttpResponseException(HttpStatusCode.BadRequest, JsonConvert.SerializeObject(ModelState));
        }