Esempio n. 1
0
        private static void CreateTestProject(PROGRESSTRACKERContext context)
        {
            Ptproject project = new Ptproject
            {
                Name        = "Test Project",
                Description = "This is a test project",
                Ptuser      = context.Ptuser.First(),
                Status      = ProjectStatus.None.ToString(),
                Active      = true
            };

            context.Ptproject.Add(project);
            context.SaveChanges();

            Pttask task = new Pttask
            {
                Description = "First Task",
                PtprojectId = project.Id,
                Completed   = false,
                Active      = true
            };

            context.Pttask.Add(task);
            context.SaveChanges();
        }
Esempio n. 2
0
        private static void CreateTestUser(PROGRESSTRACKERContext context)
        {
            Ptuser user = new Ptuser("*****@*****.**", "Tester", true, Authentication.GetEncodedPassword("test"), "This is a test user");

            context.Ptuser.Add(user);
            context.SaveChanges();
        }