Пример #1
0
        /* TESTS */
        public static void AppUsersCanBeGotFromService()
        {
            List <AppUser> someUsers = GetTestUsers();
            var            svc       = IT.GetService <AppUserService>(someUsers); // todo: how inject someUsers (context) into the repo via GetService?
            var            supers    = svc.GetSuperAdmins();

            if (supers.Count() != 1)
            {
                throw new InvalidOperationException();
            }
        }
Пример #2
0
        public async Task Save()
        {
            if (!await CanSave().ConfigureAwait(false))
            {
                return;
            }

            var svc = IT.GetService <AppUserService>(GetDataContext());
            await svc.SaveAppUser(this).ConfigureAwait(false);

            // put into permanent storage
            // notify any watchers
            // log
            throw new NotImplementedException();
        }