Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
        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();
        }