Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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
            });
        }
Esempio n. 3
0
        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);
        }