示例#1
0
        public ProfileModel(IProfileAdapter adapter)
        {
            Id   = adapter.Id;
            Name = adapter.Name;

            Accounts = new List <AccountModel>();

            if (adapter.AccountAdapters != null)
            {
                foreach (var item in adapter.AccountAdapters)
                {
                    Accounts.Add(new AccountModel(item));
                }
            }
        }
示例#2
0
        public void Update(IProfileAdapter item)
        {
            Profile profile = new Profile(item);

            _db.Entry(profile).State = EntityState.Modified;
        }
示例#3
0
        public void Create(IProfileAdapter item)
        {
            Profile profile = new Profile(item);

            _db.Profiles.Add(profile);
        }