2
로컬 데이터베이스에 저장된 데이터를 가져 오려고합니다.로컬 데이터베이스에서 데이터 선택
// Connect to the database and instantiate data context.
tablesDB = new TablesDataContext(TablesDataContext.DBConnectionString);
// Define the query to gather all of the items.
var CategoriesTablesInDB = from CategoryItem todo in tablesDB.CategoriesTable
select todo;
// Execute the query and place the results into a collection.
CategoriesTable = new ObservableCollection<CategoryItem>(CategoriesTablesInDB);
하지만 내 CategoriesTable
이 일을 한 후 카운트 = 0이 있고, CategoriesTablesInDB
는 내부 SQL 쿼리의이 :이 같은 그 뭔가를 사용하고 있습니다. 나는 Windows Phone을 처음 사용하고 있으며, 그렇게하는 것이 옳은 일이라면 나는 그렇지 않습니다. 내 쿼리가 잘못되었거나 올바르게 처리하지 못했습니까?
check @stackoverflow.com/a/2184212/1080742 – spajce
@spajce 죄송합니다.하지만 내가 묻는 내용은 – dziwna
예입니다. 내 말은 'ObservableCollection'에 아이템을 추가하려고한다는 것입니다. :) – spajce