예제 #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);
 }