public MainPageViewModel() { _context = new xLingua_StagingEntities(); Wordtypes = new ObservableCollection<WordtypeViewModel>(); var wordtypes = from w in _context.Wordtypes orderby w.Text select w; foreach (Wordtype wordtype in wordtypes) { Wordtypes.Add(new WordtypeViewModel(wordtype)); } _updateBasewordCommand = new RelayCommand(param => this.UpdateBaseword(), param => this.CanUpdateBaseword()); }
static void Main(string[] args) { using (var context = new xLingua_StagingEntities()) { var basewords = from b in context.Basewords1 where b.WordtypeId == 1 && b.LanguageId == 1 select b; foreach (var baseword in basewords) { Console.Out.WriteLine(baseword.Text); } Console.ReadKey(); } }