コード例 #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
ファイル: AppUser.cs プロジェクト: The-IT-Foundation/it
        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();
        }