예제 #1
0
 private void FillStatusProjects(MyDashboardContext myDashboardContext)
 {
     StatusProject sp;
     List<StatusProject> lsp = new List<StatusProject>();
     lsp.Add(new StatusProject { ID = 1, Status = "Active" });
     lsp.Add(new StatusProject { ID = 0, Status = "Inactive" });
     foreach (var item in lsp)
     {
         myDashboardContext.StatusProjects.Add(item);
     }
 }
예제 #2
0
파일: Program.cs 프로젝트: farean/FARonR
        static void Main(string[] args)
        {
            using (MyDashboardContext context = new MyDashboardContext())
            {
                var listado = context.StatusProjects;
                foreach (var item in listado)
                {
                    Console.Write(item.ID.ToString());
                    Console.Write(" - ");
                    Console.WriteLine(item.Status);
                }

            }
            Console.ReadKey();
        }