/// <summary> /// Initializes the context. /// </summary> private void InitilizeContext() { this.DataContext = this.RepositoryContext; if (this.DataContext == null) { throw new ObjectNotDefinedException(string.Format("DataContext cannot be null")); } }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationService{TContext}"/> class. /// </summary> /// <param name="unity">The unity.</param> /// <param name="context">The context.</param> protected ApplicationService(IUnityContainer unity, Data.IRepositoryContext context) { this.Unity = unity; this.RepositoryContext = context; this.InitilizeContext(); }