// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllers().AddNewtonsoftJson(); var personRepository = new Repository <Person>(); services.AddSingleton <IRepository <Person> >(personRepository); services.AddSingleton <IRepository <Film> >(new Repository <Film>()); services.AddSingleton <IRepository <Planet> >(new Repository <Planet>()); services.AddSingleton <IRepository <Vehicle> >(new Repository <Vehicle>()); services.AddSingleton <IRepository <Starship> >(new Repository <Starship>()); services.AddSingleton <IRepository <Specie> >(new Repository <Specie>()); var relationshipHandler = new RelationshipHandler(personRepository); services.AddSingleton <IRelationshipHandler>(relationshipHandler); }
public RelationshipHandlerTests() { _relationshipHandler = new RelationshipHandler(); }
public Operation(Kingdom kingdom) { this._kingdom = kingdom; this._relationshipHandler = new RelationshipHandler(); }