Exemplo n.º 1
0
        public FactFind Create(int userId)
        {
            var factFind = new FactFind
            {
                PageOne   = new PageOne(),
                PageTwo   = new PageTwo(),
                PageThree = new PageThree(),
                PageFour  = new PageFour(),
                PageFive  = new PageFive(),
                PageSix   = new PageSix(),
                PageSeven = new PageSeven(),
                PageEight = new PageEight(),
                PageNine  = new PageNine(),
                PageTen   = new PageTen(),
                UserId    = userId
            };

            _dbContext.FactFinds.Add(factFind);
            try
            {
                _dbContext.SaveChanges();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }

            return(factFind);
        }