コード例 #1
0
        public User Update(User record)
        {
            MYS_USER updatedRecord = UserMapper.ConvertToDBRecord(record);
            var      user          = Container.Table_User.Attach(updatedRecord);

            if (Container.SaveChanges() == 1)
            {
                record.Id = user.Id;
            }
            return(record);
        }
コード例 #2
0
        public User Insert(User record)
        {
            MYS_USER newRecord = UserMapper.ConvertToDBRecord(record);

            var userMessage = Container.Table_User.Add(newRecord);

            Container.SaveChanges();

            record.Id = userMessage.Id;

            return(record);
        }