Exemplo n.º 1
0
        public IHttpActionResult PutRiskStatus(Guid id, RiskStatus riskStatus)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != riskStatus.RiskStatusId)
            {
                return(BadRequest());
            }

            db.Entry(riskStatus).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!RiskStatusExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            RiskStatus riskStatus = db.RiskStatus.Find(id);

            db.RiskStatus.Remove(riskStatus);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
            public void CheckSearchByRiskStatus()
            {
                RiskStatus status = RiskStatus.Closed;
                var        result = search.GetListOfRisksWithStatus(status);

                Assert.True(result.Count == 1);
                Assert.True(result[0].Status == status);
            }
 public ActionResult Edit([Bind(Include = "RiskStatusId,RiskStatusValue")] RiskStatus riskStatus)
 {
     if (ModelState.IsValid)
     {
         db.Entry(riskStatus).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(riskStatus));
 }
        public ActionResult Create([Bind(Include = "RiskStatusId,RiskStatusValue")] RiskStatus riskStatus)
        {
            if (ModelState.IsValid)
            {
                db.RiskStatus.Add(riskStatus);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(riskStatus));
        }
Exemplo n.º 6
0
        public IHttpActionResult GetRiskStatus(Guid id)
        {
            RiskStatus riskStatus = db.RiskStatus.Find(id);

            if (riskStatus == null)
            {
                return(NotFound());
            }

            return(Ok(riskStatus));
        }
        public void CheckMultiSearch_WithoutTitle()
        {
            string     ownerName = "Person 5";
            RiskStatus notStatus = RiskStatus.Open;

            var result = mSearch.GetListOfRisksByOwnerStatusTitle(ownerName, notStatus);

            Assert.True(result.Count == 1);
            Assert.True(result[0].Owner.Name == ownerName);
            Assert.True(result[0].Status != RiskStatus.Open);
        }
        public void CheckMultiSearch_AllArguments()
        {
            string     ownerName = "Person 1";;
            RiskStatus status    = RiskStatus.Open;
            string     title     = null;

            var result = mSearch.GetListOfRisksByOwnerStatusTitle(ownerName, status, title);

            Assert.True(result.Count == 2);
            Assert.True(result[0].Owner.Name == ownerName);
        }
Exemplo n.º 9
0
        public IHttpActionResult PostRiskStatus(RiskStatus riskStatus)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.RiskStatus.Add(riskStatus);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = riskStatus.RiskStatusId }, riskStatus));
        }
        public void CheckMultiSearch_WitoutOwnerName()
        {
            string     ownerName = null;
            RiskStatus status    = RiskStatus.Open;
            string     title     = "Fire";

            var result = mSearch.GetListOfRisksByOwnerStatusTitle(ownerName, status, title);

            Assert.True(result.Count == 2);
            Assert.True(result[0].Status != RiskStatus.Open);
            Assert.True(result[1].Status != RiskStatus.Open);
        }
        public void CheckSimpleBuilder_UserNameMisspelled()
        {
            string     ownerName = "Jon Mooree";
            RiskStatus status    = RiskStatus.Open;

            var builder = new Search_SimpleBuilder(listOfRisks);

            builder.GetListOfRisksWithOwnerName(ownerName);
            builder.GetListOfRisksWithDifferentStatus(status);
            var result = builder.Builded_Search();

            Assert.True(result.Count == 0);
        }
        public void CheckSimpleBuilder_TitleMisspelled()
        {
            RiskStatus notStatus = RiskStatus.Open;
            string     title     = "Fire,";

            var builder = new Search_SimpleBuilder(listOfRisks);

            builder.GetListOfRisksWithTitleContains(title);
            builder.GetListOfRisksWithDifferentStatus(notStatus);
            var result = builder.Builded_Search();

            Assert.True(result.Count == 0);
        }
Exemplo n.º 13
0
        public IHttpActionResult DeleteRiskStatus(Guid id)
        {
            RiskStatus riskStatus = db.RiskStatus.Find(id);

            if (riskStatus == null)
            {
                return(NotFound());
            }

            db.RiskStatus.Remove(riskStatus);
            db.SaveChanges();

            return(Ok(riskStatus));
        }
Exemplo n.º 14
0
            public void CheckSearchByDiffrentRiskStatus()
            {
                RiskStatus notStatus = RiskStatus.Approved;
                var        result    = search.GetListOfRisksWithDifferentStatus(notStatus);

                Assert.True(result.Count == 7);
                Assert.True(result[0].Status != notStatus);
                Assert.True(result[1].Status != notStatus);
                Assert.True(result[2].Status != notStatus);
                Assert.True(result[3].Status != notStatus);
                Assert.True(result[4].Status != notStatus);
                Assert.True(result[5].Status != notStatus);
                Assert.True(result[6].Status != notStatus);
            }
        // GET: RiskStatus/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RiskStatus riskStatus = db.RiskStatus.Find(id);

            if (riskStatus == null)
            {
                return(HttpNotFound());
            }
            return(View(riskStatus));
        }
        public void CheckSimpleBuilder_WithoutOwnerName()
        {
            RiskStatus notStatus = RiskStatus.Open;
            string     title     = "fire";

            var builder = new Search_SimpleBuilder(listOfRisks);

            builder.GetListOfRisksWithTitleContains(title);
            builder.GetListOfRisksWithDifferentStatus(notStatus);
            var result = builder.Builded_Search();

            Assert.True(result.Count == 2);
            Assert.True(result[0].Title.Contains(title));
            Assert.True(result[0].Status != RiskStatus.Open);
        }
        public void CheckSimpleBuilder_WithoutTitle()
        {
            string     ownerName = "Person 5";
            RiskStatus status    = RiskStatus.Open;

            var builder = new Search_SimpleBuilder(listOfRisks);

            builder.GetListOfRisksWithOwnerName(ownerName);
            builder.GetListOfRisksWithDifferentStatus(status);
            var result = builder.Builded_Search();

            Assert.True(result.Count == 1);
            Assert.True(result[0].Owner.Name == ownerName);
            Assert.True(result[0].Status != RiskStatus.Open);
        }
        public void CheckDecorator_WithoutOwnerName()
        {
            RiskStatus notStatus = RiskStatus.Open;
            string     title     = "fire";

            IDecoratorSolution riskList = new DecoratorSolutionBase();

            riskList = new DiffrentStatesOfRiskDecorator(riskList, notStatus);
            riskList = new ByRiskTitleDecorator(riskList, title);

            var result = riskList.GetRisks().ToList();

            Assert.True(result.Count == 2);
            Assert.True(result[0].Title.Contains(title));
            Assert.True(result[0].Status != RiskStatus.Open);
        }
        public void CheckCommand_RiskStatus()
        {
            RiskStatus notStatus = RiskStatus.Open;

            var builder = new Search_SimpleBuilder(listOfRisks);


            builder.GetListOfRisksWithDifferentStatus(notStatus);
            var result = builder.Builded_Search();

            Assert.True(result.Count == 7);
            foreach (var i in result)
            {
                Assert.True(i.Status != RiskStatus.Open);
            }
        }
        public void CheckDecorator_RiskStatus()
        {
            RiskStatus notStatus = RiskStatus.Open;

            IDecoratorSolution riskList = new DecoratorSolutionBase();

            riskList = new DiffrentStatesOfRiskDecorator(riskList, notStatus);

            var result = riskList.GetRisks().ToList();

            Assert.True(result.Count == 7);
            foreach (var i in result)
            {
                Assert.True(i.Status != RiskStatus.Open);
            }
        }
Exemplo n.º 21
0
        public async Task <IActionResult> UpdateRiskStatus(int id, RiskStatus riskStatusForUpdate)
        {
            var riskStatus = await _context.RiskStatuses
                             .FirstOrDefaultAsync(m => m.Id == id);

            if (riskStatus == null)
            {
                return(NotFound());
            }
            riskStatus.Name = riskStatusForUpdate.Name;
            if (await _context.SaveChangesAsync() > 0)
            {
                return(CreatedAtRoute("GetRiskStatus",
                                      new { controller = "References", id = riskStatus.Id }, riskStatus));
            }
            return(BadRequest("Error update Risk Status"));
        }
Exemplo n.º 22
0
        public void CheckCommand_RiskStatus()
        {
            RiskStatus notStatus = RiskStatus.Open;

            ICommand byDiffrentStatus = new ByDiffrentStatusCommand(notStatus);

            var riskProvider = new RiskProvider(listOfRisks);

            riskProvider.ExecCommand(byDiffrentStatus);
            var result = riskProvider.GetResults().ToList();

            Assert.True(result.Count == 7);
            foreach (var i in result)
            {
                Assert.True(i.Status != RiskStatus.Open);
            }
        }
Exemplo n.º 23
0
        public void CheckCommand_UserNameMisspelled()
        {
            string     ownerName = "Jon Mooree";
            RiskStatus notStatus = RiskStatus.Open;

            ICommand byOwnerName      = new ByOnwerNameCommand(ownerName);
            ICommand byDiffrentStatus = new ByDiffrentStatusCommand(notStatus);

            var riskProvider = new RiskProvider(listOfRisks);

            riskProvider.ExecCommand(byOwnerName);
            riskProvider.ExecCommand(byDiffrentStatus);

            var result = riskProvider.GetResults().ToList();

            Assert.True(result.Count == 0);
        }
        public void CheckDecorator_WithoutTitle()
        {
            string     ownerName = "Person 5";
            RiskStatus notStatus = RiskStatus.Open;

            IDecoratorSolution riskList = new DecoratorSolutionBase();

            riskList = new ByOwnerNameDecorator(riskList, ownerName);
            riskList = new DiffrentStatesOfRiskDecorator(riskList, notStatus);


            var result = riskList.GetRisks().ToList();

            Assert.True(result.Count == 1);
            Assert.True(result[0].Owner.Name == ownerName);
            Assert.True(result[0].Status != RiskStatus.Open);
        }
Exemplo n.º 25
0
        public void CheckSimpleBuilder_WithoutOwnerName()
        {
            RiskStatus notStatus = RiskStatus.Open;
            string     title     = "fire";

            ICommand byDiffrentStatus = new ByDiffrentStatusCommand(notStatus);
            ICommand byTitle          = new ByTitleCommand(title);

            var riskProvider = new RiskProvider(listOfRisks);

            riskProvider.ExecCommand(byDiffrentStatus);
            riskProvider.ExecCommand(byTitle);
            var result = riskProvider.GetResults().ToList();

            Assert.True(result.Count == 2);
            Assert.True(result[0].Title.Contains(title));
            Assert.True(result[0].Status != RiskStatus.Open);
        }
        public void CheckDecorator_AllMethods()
        {
            RiskStatus notStatus = RiskStatus.Open;
            string     title     = "fire";
            string     ownerName = "Person 5";

            IDecoratorSolution riskList = new DecoratorSolutionBase();

            riskList = new ByOwnerNameDecorator(riskList, ownerName);
            riskList = new DiffrentStatesOfRiskDecorator(riskList, notStatus);
            riskList = new ByRiskTitleDecorator(riskList, title);

            var result = riskList.GetRisks().ToList();

            Assert.True(result.Count == 1);
            Assert.True(result[0].Owner.Name.ToLower() == ownerName.ToLower());
            Assert.True(result[0].Title.Contains(title));
            Assert.True(result[0].Status != RiskStatus.Open);
        }
Exemplo n.º 27
0
        public void CheckCommand_WithoutTitle()
        {
            string     ownerName = "Person 5";
            RiskStatus notStatus = RiskStatus.Open;

            ICommand byOwnerName      = new ByOnwerNameCommand(ownerName);
            ICommand byDiffrentStatus = new ByDiffrentStatusCommand(notStatus);

            var riskProvider = new RiskProvider(listOfRisks);

            riskProvider.ExecCommand(byOwnerName);
            riskProvider.ExecCommand(byDiffrentStatus);

            var result = riskProvider.GetResults().ToList();;

            Assert.True(result.Count == 1);
            Assert.True(result[0].Owner.Name == ownerName);
            Assert.True(result[0].Status != RiskStatus.Open);
        }
Exemplo n.º 28
0
        public void CheckCommand_AllMethods()
        {
            RiskStatus notStatus = RiskStatus.Open;
            string     title     = "fire";
            string     ownerName = "Person 5";

            ICommand byOwnerName      = new ByOnwerNameCommand(ownerName);
            ICommand byDiffrentStatus = new ByDiffrentStatusCommand(notStatus);
            ICommand byTitle          = new ByTitleCommand(title);

            var riskProvider = new RiskProvider(listOfRisks);

            riskProvider.ExecCommand(byOwnerName);
            riskProvider.ExecCommand(byDiffrentStatus);
            riskProvider.ExecCommand(byTitle);
            var result = riskProvider.GetResults().ToList();

            Assert.True(result.Count == 1);
            Assert.True(result[0].Owner.Name == ownerName);
            Assert.True(result[0].Title.Contains(title));
            Assert.True(result[0].Status != RiskStatus.Open);
        }
Exemplo n.º 29
0
 public ByDiffrentStatusCommand(RiskStatus status)
 {
     statusOfRisk = status;
 }
Exemplo n.º 30
0
        protected override void Seed(DataContext context)
        {
            base.Seed(context);
            var      guid = new Guid();
            DateTime dt   = DateTime.Now;

            #region Uesrs
            Users users = new Users
            {
                UserId     = guid,
                Username   = "******",
                Password   = "******",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt
            };
            context.Users.Add(users);
            context.SaveChanges();
            #endregion

            #region ProjectStageList
            List <ProjectStageList> projectStages    = new List <ProjectStageList>();
            ProjectStageList        projectStageList = new ProjectStageList
            {
                Name        = "Approval In Principle",
                Description = "Approval In Principle",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "As - Built",
                Description = "As - Built",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Construction",
                Description = "Construction",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Demolition",
                Description = "Demolition",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Detailed Design",
                Description = "Detailed Design",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Feasibility / Masterplanning",
                Description = "Feasibility / Masterplanning",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Operation / Maintenance",
                Description = "Operation / Maintenance",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Outline Design",
                Description = "Outline Design",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Rail - Grip 3 - Option Selection",
                Description = "Rail - Grip 3 - Option Selection",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Rail - Grip 4 - Approval in Principle",
                Description = "Rail - Grip 4 - Approval in Principle",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Rail - Grip 5 - Detail Design / AFC",
                Description = "Rail - Grip 5 - Detail Design / AFC",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Rail - Grip 6 - Construction on Site",
                Description = "Rail - Grip 6 - Construction on Site",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);

            projectStageList = new ProjectStageList
            {
                Name        = "Rail - Grip 7 - As - Built Records",
                Description = "Rail - Grip 7 - As - Built Records",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            projectStages.Add(projectStageList);
            context.ProjectStageList.AddRange(projectStages);
            #endregion

            #region Lifecycles
            List <Lifecycles> lifecyclesList = new List <Lifecycles>();
            Lifecycles        lifecycles     = new Lifecycles
            {
                Name       = "Construction",
                Code       = "C",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            lifecyclesList.Add(lifecycles);

            lifecycles = new Lifecycles
            {
                Name       = "Maintenance",
                Code       = "M",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            lifecyclesList.Add(lifecycles);

            lifecycles = new Lifecycles
            {
                Name       = "Operation",
                Code       = "O",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            lifecyclesList.Add(lifecycles);

            lifecycles = new Lifecycles
            {
                Name       = "Demolition",
                Code       = "D",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            lifecyclesList.Add(lifecycles);
            context.Lifecycles.AddRange(lifecyclesList);
            #endregion

            #region RiskScores
            List <RiskScores> riskScoreList = new List <RiskScores>();
            RiskScores        riskScores    = new RiskScores
            {
                Name       = "Low",
                Code       = "L",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            riskScoreList.Add(riskScores);

            riskScores = new RiskScores
            {
                Name       = "Medium",
                Code       = "M",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            riskScoreList.Add(riskScores);

            riskScores = new RiskScores
            {
                Name       = "High",
                Code       = "H",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            riskScoreList.Add(riskScores);
            context.RiskScores.AddRange(riskScoreList);
            #endregion

            #region IssuePurposes
            List <IssuePurposes> issuePuroseList = new List <IssuePurposes>();
            IssuePurposes        issuePurposes   = new IssuePurposes
            {
                Name        = "DRAFT",
                Description = "DRAFT",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            issuePuroseList.Add(issuePurposes);

            issuePurposes = new IssuePurposes
            {
                Name        = "INFORMATION",
                Description = "INFORMATION",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            issuePuroseList.Add(issuePurposes);

            issuePurposes = new IssuePurposes
            {
                Name        = "ACCEPTANCE",
                Description = "ACCEPTANCE",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            issuePuroseList.Add(issuePurposes);

            issuePurposes = new IssuePurposes
            {
                Name        = "APPROVAL",
                Description = "APPROVAL",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            issuePuroseList.Add(issuePurposes);

            issuePurposes = new IssuePurposes
            {
                Name        = "H&S FILE",
                Description = "H&S FILE",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            issuePuroseList.Add(issuePurposes);

            issuePurposes = new IssuePurposes
            {
                Name        = "RESIDUAL RISKS",
                Description = "RESIDUAL RISKS",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            issuePuroseList.Add(issuePurposes);
            context.IssuePurposes.AddRange(issuePuroseList);
            #endregion

            #region Severities
            List <Severities> severitiesList = new List <Severities>();
            Severities        severities     = new Severities
            {
                Name       = "Fatality",
                Code       = "5",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            severitiesList.Add(severities);

            severities = new Severities
            {
                Name       = "Major Injury",
                Code       = "4",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            severitiesList.Add(severities);

            severities = new Severities
            {
                Name       = "Significant Injury",
                Code       = "3",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            severitiesList.Add(severities);

            severities = new Severities
            {
                Name       = "Lost-Time Injury",
                Code       = "2",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            severitiesList.Add(severities);

            severities = new Severities
            {
                Name       = "First Aid Case",
                Code       = "1",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            severitiesList.Add(severities);
            context.Severities.AddRange(severitiesList);
            #endregion

            #region Likelihoods
            List <Likelihoods> likelihoodsList = new List <Likelihoods>();
            Likelihoods        likelihoods     = new Likelihoods
            {
                Name       = "Absolute Certainty",
                Code       = "5",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            likelihoodsList.Add(likelihoods);

            likelihoods = new Likelihoods
            {
                Name       = "Very Likely",
                Code       = "4",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            likelihoodsList.Add(likelihoods);

            likelihoods = new Likelihoods
            {
                Name       = "Likely",
                Code       = "3",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            likelihoodsList.Add(likelihoods);

            likelihoods = new Likelihoods
            {
                Name       = "Unlikely",
                Code       = "2",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            likelihoodsList.Add(likelihoods);

            likelihoods = new Likelihoods
            {
                Name       = "Remote",
                Code       = "1",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            likelihoodsList.Add(likelihoods);
            context.Likelihoods.AddRange(likelihoodsList);
            #endregion

            #region DisciplineList
            List <DisciplineList> disciplineLists = new List <DisciplineList>();
            DisciplineList        discipline      = new DisciplineList
            {
                Name       = "General",
                Code       = "GEN",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Multi-Disciplinary",
                Code       = "MULTI",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Other (Specify)",
                Code       = "OTHER",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Acoustics",
                Code       = "ACOU",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Architectural",
                Code       = "ARCH",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Civil",
                Code       = "CIV",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Electrical",
                Code       = "ELEC",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Facilities Management",
                Code       = "FACM",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Façades",
                Code       = "FCDE",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Finance",
                Code       = "FIN",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Fire",
                Code       = "FIRE",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Mechanical & Electrical",
                Code       = "M&E",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Mechanical",
                Code       = "MECH",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Project Management",
                Code       = "PM",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Rail - E&P (3rd Rail)",
                Code       = "R-3R",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Rail - E&P (OHLE)",
                Code       = "R-OLE",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Rail - E&P (Point Heating)",
                Code       = "R-PH",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Rail - E&P (Power Supply)",
                Code       = "R-PS",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Rail - P-Way",
                Code       = "R-PW",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);

            discipline = new DisciplineList
            {
                Name       = "Structural",
                Code       = "STR",
                CreateDate = dt,
                CreatedBy  = guid,
                UpdateDate = dt,
                UpdatedBy  = guid
            };
            disciplineLists.Add(discipline);
            context.DisciplineList.AddRange(disciplineLists);
            #endregion DisciplineList

            #region RiskStatus
            List <RiskStatus> riskStatusList = new List <RiskStatus>();
            RiskStatus        riskStatus     = new RiskStatus
            {
                Name        = "ACTIVE",
                Description = "If the risk is not closed out.",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            riskStatusList.Add(riskStatus);

            riskStatus = new RiskStatus
            {
                Name        = "RESOLVED",
                Description = "If the risk has been delt with and is closed out fully.",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            riskStatusList.Add(riskStatus);

            riskStatus = new RiskStatus
            {
                Name        = "CONTINUED",
                Description = "If the risk is resolved per se, but is carried over into another entry for action.",
                CreateDate  = dt,
                CreatedBy   = guid,
                UpdateDate  = dt,
                UpdatedBy   = guid
            };
            riskStatusList.Add(riskStatus);
            context.RiskStatus.AddRange(riskStatusList);
            #endregion

            context.SaveChanges();
        }