private static IEventParentService InitializeTarget(IOnTaskDbContext context, IMapperService mapper) { IEventParentService target = new EventParentService(context, mapper); target.AddApplicationUser(User); return(target); }
/// <summary> /// Initializes a new instance of the <see cref="EventParentService"/> class. /// </summary> /// <param name="context">The <see cref="DbContext"/> that the service will interact with.</param> /// <param name="mapper">The service which provides mappings from <see cref="EventParent"/> classes to <see cref="EventParentModel"/> classes.</param> public EventParentService(IOnTaskDbContext context, IMapperService mapper) { this.context = context; this.mapper = mapper; }
private static IEventParentService InitializeTarget(IOnTaskDbContext context) => InitializeTarget(context, new Mock <IMapperService>().Object);