Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repository.GetById[[IMyInterface]](id);
- class AggRoot1 : IInterface1, IInterface2 {}
- class AggRoot2 : IInterface1, IInterface2 {}
- repository.GetById<IInterface1>(idFromAggRoot1);
- public class MyAggregateFactory : IConstructAggregates
- {
- public IAggregate Build(Type type, Guid id, IMemento snapshot)
- {
- if (type == typeof(IMyInterface))
- return new MyAggregate();
- else
- return Activator.CreateInstance(type) as IAggregate;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment