public static void ChangeDatabaseTo(this ITheGarageData db, string newDatabaseName) { var conStr = db.Context.Database.Connection.ConnectionString; var pattern = "Initial Catalog *= *([^;]*) *"; var newConStr = Regex.Replace(conStr, pattern, m => { return(m.Groups.Count == 2 ? string.Format("Initial Catalog={0}", newDatabaseName) : m.ToString()); }); db.Context.Database.Connection.ConnectionString = newConStr; }
public ClientsAdministrationService(ITheGarageData data) : base(data) { }
public BaseAdministrationService(ITheGarageData data) { this.data = data; }
public UsersService(ITheGarageData data) { this.data = data; }
public CompanyAdministrationService(ITheGarageData data) : base(data) { }
public UsersAdministrationService(ITheGarageData data) : base(data) { }
public AccountController(ITheGarageData data) { this.data = data; }
public HomeController(ITheGarageData data) { this.data = data; }
public UserProfileService(ITheGarageData data) { this.data = data; }