private async void addWeb() { if (!string.IsNullOrEmpty(WebName) && !string.IsNullOrEmpty(WebUrl)) { //TODO: Add to SQLite Database try { var web = new Web() { Name = WebName, Url = WebUrl.ToUrl() }; await sqliteService.CreateWebAsync(web); WebName = string.Empty; WebUrl = string.Empty; Webs.Add(web); } catch (SQLiteException ex) { MessageDialog dialog = new MessageDialog(ex.Message, "Error to add web"); var dialogTask = dialog.ShowAsync(); } } else { MessageDialog dialog = new MessageDialog("Web Name and Web URL is required", "Error to add web"); var dialogTask = dialog.ShowAsync(); } }
public Task<int> UpdateWebAsync(Web item) { return sqliteConnection.UpdateAsync(item); }
public Task<int> DeleteWebAsync(Web item) { return sqliteConnection.DeleteAsync(item); }
public Task<int> CreateWebAsync(Web item) { return sqliteConnection.InsertAsync(item); }