コード例 #1
0
        public int addGibUserList(GibUserListXmlModel userList)
        {
            using (DatabaseContext databaseContext = new DatabaseContext())
            {
                GibUsers gibUser;

                foreach (var user in userList.Items)
                {
                    gibUser             = new GibUsers();
                    gibUser.aliasPk     = user.alias;
                    gibUser.identifier  = user.identifier;
                    gibUser.title       = user.title;
                    gibUser.productType = user.documentTpye;

                    //  databaseContext.gibUsers.Add(gibUser);

                    if (user.identifier == "4840847211")
                    {
                        databaseContext.gibUsers.Add(gibUser);
                    }
                }

                return(databaseContext.SaveChanges());
            }
        }
コード例 #2
0
        public void addGibUser(string aliasPk, string identifier, string title)
        {
            using (DatabaseContext databaseContext = new DatabaseContext())
            {
                GibUsers gibUsers = new GibUsers();
                gibUsers.aliasPk    = aliasPk;
                gibUsers.identifier = identifier;
                gibUsers.title      = title;

                databaseContext.gibUsers.Add(gibUsers);
                databaseContext.SaveChanges();
            }
        }