public async Task <int> InsertAsync(ProductAttributeCategoryMapping entity) { if (entity == null) { throw new ArgumentNullException("ProductAttributeCategoryMapping"); } return(await _ProductAttributeCategoryMappingRepository.InsertAsync(entity)); }
public async Task <int> DeleteAsync(ProductAttributeCategoryMapping entity) { if (entity == null) { throw new ArgumentNullException("ProductAttributeCategoryMapping"); } return(await UpdateAsync(entity)); }
public async Task <IHttpActionResult> Delete(int id) { ProductAttributeCategoryMapping entity = await ProductAttributeCategoryMappingService.FindOneAsync(id); if (entity == null) { return(NotFound()); } await ProductAttributeCategoryMappingService.DeleteAsync(entity); return(Ok(entity.ToModel())); }
public static ProductAttributeCategoryMapping ToEntity(this ProductAttributeCategoryMappingDTO dto, ProductAttributeCategoryMapping entity) { return(Mapper.Map(dto, entity)); }
public static ProductAttributeCategoryMappingDTO ToModel(this ProductAttributeCategoryMapping entity) { return(Mapper.Map <ProductAttributeCategoryMapping, ProductAttributeCategoryMappingDTO>(entity)); }