Exemplo n.º 1
0
 public void MinionSave()
 {
     using (var dt = new AshleyGraham()) {
         dt.Pros.Update(Pro);
         dt?.SaveChanges();
     }
 }
Exemplo n.º 2
0
        private void LoadPoopy()
        {
            var R = new Raw {
                Name = "raw"
            };
            var RT = new Raw {
                Name = "raw2"
            };

            var P = new Pro {
                Name = "praw"
            };
            var PT = new Pro {
                Name = "praw2"
            };
            var B = new Blend {
                Name = "Blend"
            };
            var BT = new Blend {
                Name = "Blend2"
            };

            using (var dt = new AshleyGraham()) {
                dt.Database.EnsureCreated();
                dt.Pros.AddRange(P, PT);
                dt.Raws.AddRange(R, RT);
                dt.Blends.AddRange(B, BT);
                dt.SaveChanges();
            }
        }
Exemplo n.º 3
0
        public void TestMethod1()
        {
            var R = new Raw {
                Name = "raw"
            };
            var RT = new Raw {
                Name = "raw2"
            };

            var P = new Pro {
                Name = "praw"
            };
            var PT = new Pro {
                Name = "praw2"
            };
            var B = new Blend {
                Name = "Blend"
            };
            var BT = new Blend {
                Name = "Blend2"
            };

            using (var dt = new AshleyGraham()) {
                dt.Database.EnsureCreated();
                dt.Pros.AddRange(P, PT);
                dt.Raws.AddRange(R, RT);
                dt.Blends.AddRange(B, BT);
                dt.SaveChanges();
            }

            using (var dt = new AshleyGraham()) {
                var a = dt.Model.ToString();
            }
        }