Example #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));
                }
            }
        }
Example #2
0
        public void Update(IProfileAdapter item)
        {
            Profile profile = new Profile(item);

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

            _db.Profiles.Add(profile);
        }