Конфигурация Вэб Клиентов
//var tradeWebClient = new TradeWebClient(@"http://192.168.1.57/positionsMvc_01/", @"application/xml", @"api/apiTrades");
var tradeWebClient = new TradeWebClient(@"http://192.168.10.6/positionsMvc_01/", @"application/xml", @"api/apiTrades");
Инициализация DB:
public class PositionsDbInit : DropCreateDatabaseIfModelChanges<PositionsContext>
//public class PositionsDbInit : DropCreateDatabaseAlways<PositionsContext>
{
protected override void Seed(PositionsContext context)
{
Console.WriteLine("Seed");
//context.PopulateTrades();
// context.PopulatePositions();
}
}
Database.SetInitializer<PositionsContext>(new PositionsDbInit());
Строки подключения:
<add name="Positions" connectionString="Server=192.168.10.6;Initial Catalog=Positions_12;user=sa;password=qwerty" providerName="System.Data.SqlClient"/>
<add name="Positions" connectionString="Server=192.168.10.6;Initial Catalog=Positions_12;Integrated Security=True;" providerName="System.Data.SqlClient"/>
<add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnet-PositionsMvc_01-20140818100456.mdf;Initial Catalog=aspnet-PositionsMvc_01-20140818100456;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
//var tradeWebClient = new TradeWebClient(@"http://192.168.1.57/positionsMvc_01/", @"application/xml", @"api/apiTrades");
var tradeWebClient = new TradeWebClient(@"http://192.168.10.6/positionsMvc_01/", @"application/xml", @"api/apiTrades");
Инициализация DB:
public class PositionsDbInit : DropCreateDatabaseIfModelChanges<PositionsContext>
//public class PositionsDbInit : DropCreateDatabaseAlways<PositionsContext>
{
protected override void Seed(PositionsContext context)
{
Console.WriteLine("Seed");
//context.PopulateTrades();
// context.PopulatePositions();
}
}
Database.SetInitializer<PositionsContext>(new PositionsDbInit());
Строки подключения:
<add name="Positions" connectionString="Server=192.168.10.6;Initial Catalog=Positions_12;user=sa;password=qwerty" providerName="System.Data.SqlClient"/>
<add name="Positions" connectionString="Server=192.168.10.6;Initial Catalog=Positions_12;Integrated Security=True;" providerName="System.Data.SqlClient"/>
<add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnet-PositionsMvc_01-20140818100456.mdf;Initial Catalog=aspnet-PositionsMvc_01-20140818100456;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
Комментариев нет:
Отправить комментарий