Пример #1
0
    static MappingTests()
    {
        ArgumentGraphs.Initialise();
        GraphTypeTypeRegistry.Register <MappingParent, MappingParentGraph>();
        GraphTypeTypeRegistry.Register <MappingChild, MappingChildGraph>();

        sqlInstance = new SqlInstance <MappingContext>(
            constructInstance: builder => new MappingContext(builder.Options));
    }
Пример #2
0
        public static void RegisterInContainer(Action <Type, object> register, EdmModel model, GlobalFilters filters = null)
        #endregion
        {
            Guard.AgainstNull(nameof(register), register);
            Guard.AgainstNull(nameof(model), model);
            Scalars.RegisterInContainer(register);
            ArgumentGraphs.RegisterInContainer(register);

            if (filters == null)
            {
                filters = new GlobalFilters();
            }

            var service = new EntityGraphAdapter(model, filters);

            register(typeof(IEntityGraphAdapter), service);
        }
Пример #3
0
 static void RegisterScalarsAndArgs(IServiceCollection services)
 {
     ArgumentGraphs.RegisterInContainer(services);
 }