Exemple #1
0
        public async Task VerfiyModelSetAdapter()
        {
            using var c = CreateTestContainer();

            c.AddModel2EntitySupport();
            c.AddAutoMapper <DataProfile>();

            c.AddModelSetAdapter <OtherClass, ModelIntKey>(cfg =>
            {
                var l = SampleContext.CreateData();

                cfg.Queryable = (ct) => l.AsQueryable();
            });

            var fac = c.Resolve <IModelSetFactory>();

            var ms = fac.CreateReadOnly <OtherClass>();
            {
                var a = await ms.AllAsync(default);