Exemple #1
0
        public void AddNewTest()
        {
            using (System.Data.Entity.Core.EntityClient.EntityConnection entity = new System.Data.Entity.Core.EntityClient.EntityConnection("MyProjectEF1"))
            {
                entity.Open();
                EntityCommand cmd = entity.CreateCommand();
                cmd.CommandText = @"select doubt d from uLibrary as d where d.";
            }



            MyProjectEF mp = new MyProjectEF();



            mp.uLibrary.ToList();

            mp.uUsers.Add(new uUser()
            {
                UserName     = "******",
                Password     = Base64Helper.Base64Encode("msc@123321"),
                Email        = "*****@*****.**",
                CreationDate = DateTime.Now,
                EditDate     = DateTime.Now,
                FirstName    = "Edwin",
                LastName     = "Nie",
                FullName     = "Edwin Nie",
                LCV          = false
            });
            mp.SaveChanges();
        }
Exemple #2
0
        public void CreateNewFunctions()
        {
            MyProjectEF ef = new MyProjectEF();

            uFunction fun = new uFunction();

            fun.FunName      = "Dashboard";
            fun.FunTypeId    = 1;
            fun.LCV          = false;
            fun.CreationDate = DateTime.Now;
            fun.FunSeq       = 0;
            ef.uFunctions.Add(fun);
            ef.SaveChanges();
        }