public TasteCategoryDTO Delete(TasteCategoryDTO obj) { try { TasteCategory tasteCategory = _mapper.Map <TasteCategory>(obj); tasteCategoryRepository.Delete(tasteCategory); return(obj); } catch (Exception ex) { throw ex; } }
public TasteCategoryDTO AddOrUpdate(TasteCategoryDTO obj) { try { TasteCategory tasteCategory = _mapper.Map <TasteCategory>(obj); tasteCategoryRepository.AddOrUpdate(tasteCategory); return(_mapper.Map <TasteCategoryDTO>(tasteCategory)); } catch (Exception ex) { throw ex; } }