Произошла ошибка: [InternalEnsureScopeInfoAsync] Overwrite: False.. [InternalGetSchema Async].. [InternalGet TableSchema Async). Таблица:Продукт.. При получении результатов с сервера произошла ошибка транспортного уровня. (поставщик: TCP-провайдер, ошибка: 2-соединение прервано)
Вот мой код:
Код: Выделить всё
// Class Categories
public class Categories
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string NomCategorie { get; set; }
public string DateCreation { get; set; }
}
Код: Выделить всё
// Connection string for SQL Server
string connectionString = @"Data Source=SQL server ;Initial Catalog=db ;User Id= admin;Password=Password";
// Initialization of Categories
SqlSyncProvider serverProvider = new SqlSyncProvider(connectionString);
string dbPath = Path.Combine(FileSystem.AppDataDirectory, "mydb.db");
SqliteSyncProvider clientProvider = new SqliteSyncProvider(dbPath);
// Configuring synchronization for the "Categories" table
var setup = new SyncSetup("Categories");
// Create the synchronization agent and execute the synchronization
SyncAgent agent = new SyncAgent(clientProvider, serverProvider);
var result = await agent.SynchronizeAsync(setup);
Категории таблицы в SQL Server
Я несколько раз искал в Интернете, но не нашел никакой информации.
Подробнее здесь: https://stackoverflow.com/questions/784 ... ndroid-pla
Мобильная версия