public MainPage() { InitializeComponent(); ISQLiteAsyncConnectionService connectionService = DependencyService.Get <ISQLiteAsyncConnectionService>(); _contactRepo = new Repository <Contact>(connectionService); }
public ContactDetailPage(Contact contact) { InitializeComponent(); BindingContext = contact; ISQLiteAsyncConnectionService connectionService = DependencyService.Get <ISQLiteAsyncConnectionService>(); _contactRepo = new Repository <Contact>(connectionService); }
public Repository(ISQLiteAsyncConnectionService connectionService) { _connectionService = connectionService; _connection = _connectionService.GetConnection(); _connection.CreateTableAsync <T>(); }