public void AddSale(ViewModelSale vSale) { _iSaleRepository.InsertOrUpdate(Mapper.Map<ViewModelSale, Sale>(vSale)); _iSaleRepository.Save(); }
public ViewModelSale Delete(ViewModelSale vSale) { try { _iSaleRepository.Delete(vSale.Id); _iSaleRepository.Save(); return vSale; } catch (Exception e) { return null; } }
public void InsertOrUpdate(ViewModelSale vSale) { try { _iSaleRepository.InsertOrUpdate(Mapper.Map<ViewModelSale, Sale>(vSale)); _iSaleRepository.Save(); } catch (Exception e) { } }