/// <summary>
        /// The contructor requires an open DataContext to work with
        /// </summary>
        /// <param name="context">An open DataContext</param>

        public RepositoryPlanning(PlanningContext context)
        {
            this.Context = context;
            try
            {
                this.Entities = context.Set <TEntity>();
            }
            catch
            {
                this.Queries = context.Query <TEntity>();
            }
        }