static MappingTests() { ArgumentGraphs.Initialise(); GraphTypeTypeRegistry.Register <MappingParent, MappingParentGraph>(); GraphTypeTypeRegistry.Register <MappingChild, MappingChildGraph>(); sqlInstance = new SqlInstance <MappingContext>( constructInstance: builder => new MappingContext(builder.Options)); }
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); }
static void RegisterScalarsAndArgs(IServiceCollection services) { ArgumentGraphs.RegisterInContainer(services); }