Top "Datacontext" questions

A DataContext is used in WPF, Silverlight and various other .NET technologies.

C# Linq-to-Sql - Should DataContext be disposed using IDisposable

I have several methods that deal with DB and all of them start by calling FaierDbDataContext db = new FaierDbDataContext(); Since …

linq-to-sql datacontext idisposable
Use DataContext as CommandParameter in WPF

I want to pass the current DataContext (which is an instance of a ViewModel) as a CommandParameter on a WPF …

wpf xaml binding datacontext
MVVM Pattern, ViewModel DataContext question

I need to figure out how to communicate between ViewModels. I'm new to MVVM so please be kind. Here's a …

c# wpf mvvm viewmodel datacontext
wpf how to bind to DataContext existence?

I set the datacontext dynamically in code. I would like a button on screen to be enabled/disabled depending if …

c# wpf binding datacontext
WPF binding with PlacementTarget and RelativeSource

Can you explain the following WPF code: DataContext="{Binding Path=PlacementTarget,RelativeSource={x:Static RelativeSource.Self}}"> I find it …

wpf binding datacontext
EntityFramework: Retrieve data with a condition on two different context

I'm importing data between two different database(which have not the same context). So I've two different context. The goal …

sql linq entity-framework datacontext cross-database
Difference between ItemsSource and DataContext as pertains to ListBox

I am not quite grokking the difference between ItemsSource and DataContext. Can someone explain it and back it up with …

silverlight silverlight-4.0 datacontext itemssource
Linq: Get a list of all tables within DataContext

I have a DataContext (Linq to Sql) with over 100 tables, is it possible to get a list of all those …

.net linq asp.net-3.5 datacontext
DataContext as Source for Converter Binding Within Resources

<Canvas.DataContext> <ViewModels:VMSomeControl Model="{Binding RelativeSource={RelativeSource TemplatedParent}}" /> </Canvas.DataContext> <!-- DataContext …

wpf binding datacontext controltemplate ivalueconverter
How to detach a LINQ-to-SQL data object from the DataContext's tracking mechanism?

After asking this question, where I was informed of how the Table<T>.Attach() method works, I have …

c# linq linq-to-sql datacontext