/// <summary>
        /// Set seed scenario #1. The scenario contains 2 projects, 3 tasks and
        /// 1 user (email: [email protected], password: 111111).
        /// </summary>
        public void SetSeedScenario1()
        {
            var dataLoader = new Effort.DataLoaders.CsvDataLoader(
                Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\Seed1"));

            connection = Effort.DbConnectionFactory.CreatePersistent(id.ToString(), dataLoader);
        }
Example #2
0
 //
 public static ApplicationDbContext GetEffortEntity(string connectionString, string fullPath)
 {
     Effort.DataLoaders.IDataLoader _loader = new Effort.DataLoaders.CsvDataLoader(fullPath);
     // The 'data source' keyword is not supported.
     System.Data.Common.DbConnection _connection =
         Effort.DbConnectionFactory.CreateTransient(_loader);
     // System.Data.Entity.Core.Objects.ObjectContext
     return(new ApplicationDbContext(_connection));
 }