public void Add(IPQuoteCustomModel iPQuoteCustomModel) { if (iPQuoteCustomModel == null) { //throw new ArgumentNullException(nameof(iPQuoteCustomModel)); } ip_quote_custom ipQuoteCustomDB = Mapper.Map(iPQuoteCustomModel, new ip_quote_custom()); AMDSystemsEntities.ip_quote_custom.Add(ipQuoteCustomDB); AMDSystemsEntities.SaveChanges(); }
public static IPQuoteCustomModel Convert(ip_quote_custom ipQuoteCustomDB) { if (ipQuoteCustomDB == null) { //throw new ArgumentNullException(nameof(ipQuoteCustomDB)); } return(new IPQuoteCustomModel() { quote_custom_id = ipQuoteCustomDB.quote_custom_id, quote_id = ipQuoteCustomDB.quote_id }); }
public static ip_quote_custom Map(IPQuoteCustomModel iPQuoteCustomModel, ip_quote_custom ipQuoteCustomDB) { if (iPQuoteCustomModel == null) { //throw new ArgumentNullException(nameof(iPQuoteCustomModel)); } if (ipQuoteCustomDB == null) { //throw new ArgumentNullException(nameof(ipQuoteCustomDB)); } ipQuoteCustomDB.quote_id = iPQuoteCustomModel.quote_id; return(ipQuoteCustomDB); }