Пример #1
0
        public int AddLob(LobModel model)
        {
            var lob = new tbl_Lob()
            {
                Lob = model.Lob
            };

            this.db.TblLob.Add(lob);
            this.db.SaveChanges();

            return(lob.IdLob);
        }
Пример #2
0
        public int AddLob(LobListModel model)
        {
            if (model == null)
            {
                throw new ArgumentException(ValidationConstants.LobDefinedMessage);
            }

            var lob = new tbl_Lob()
            {
                Lob           = model.Lob,
                MmcpLob       = model.MmcpLob,
                MmcpSegment   = model.MmcpSegment,
                ProductLine1  = model.ProductLine1,
                ProductLine2  = model.ProductLine2,
                ProductLine3  = model.ProductLine3,
                SpphIdProduct = model.SpphIdProduct
            };

            this.db.TblLob.Add(lob);
            this.db.SaveChanges();

            return(lob.IdLob);
        }