示例#1
0
        /*
         * App specific code goes here!
         */


        public static pipeselection CreatePipeSelection(pipeselection pipeSelection)
        {
            using (var db = new SDHackathonSQLEntities())
            {
                var ps = new pipeselection();

                ps = db.pipeselections.Add(pipeSelection);

                db.SaveChanges();

                return(ps);
            }
        }
示例#2
0
        public static List <pipelength> CreatePipeLengths(List <pipelength> pipeLengths)
        {
            using (var db = new SDHackathonSQLEntities())
            {
                var returnData = new List <pipelength>();

                foreach (var pls in pipeLengths)
                {
                    var pl = new pipelength();

                    pl = db.pipelengths.Add(pls);

                    db.SaveChanges();

                    returnData.Add(pl);
                }

                return(returnData);
            }
        }