コード例 #1
0
        public void UpdateUserEntity()
        {
            var ctx        = new EconomicsArcadeDbContext(ConnString);
            var userEntity = ctx.Users.Find(1);

            userEntity.UpdateDateTime = DateTime.Now;
            ctx.SaveChanges();
            //ctx.UserEntitySet.
        }
コード例 #2
0
        public void CreateUserEntity()
        {
            var entity = new UserEntity
            {
                Email          = "*****@*****.**",
                CreateDateTime = DateTime.Now
            };
            var ctx = new EconomicsArcadeDbContext(ConnString);

            ctx.Users.Add(entity);
            ctx.SaveChanges();
            //ctx.UserEntitySet.
        }