Enable lazy loading for the particular block of code [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I disabled the lazy loading in context but now in for some cases I want to use lazy loading in my code but don't want to enable it through the context.
Is there is any way to enable it for the particular block of codes.

Use this http://blogs.msdn.com/b/adonet/archive/2011/01/31/using-dbcontext-in-ef-feature-ctp5-part-6-loading-related-entities.aspx
// I use princesses because ponies are too mainstream
var princesses2 = context.Princesses
.Include("Unicorns")
.ToList();
You simply include the relationship

Related

What is a *materialized* double? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Checked a number of places, but can't find a coherent concise definition of materialize in the sense of a "materialized system.double type" -- what is the word materialized signifying?
It's a fancy way of saying "deserialized". Read this MSDN page about EF which doesn't actually give a definition but it uses the word enough to clarify things through it's context such as...
Query results are materialized into objects that the Entity Framework manages.

WPF library with page - navigation of the application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
Now I experiment with your application architecture. I have wpf library(AppView.dll MVVM) with my pages (View/MyPage.xaml). I use this library in my wpf app. How do I set the correct URI for navigation ? I tried URI so "pack://application:,,,/AppView;View/MyPage.xaml". But there is an error - "resource not found appview;view/MyPage.xaml". How to use the navigation page from another assembly?
Try using /AppView;component/View/MyPage.xaml or "pack://application:,,,/AppView;component/View/MyPage.xaml"

What is the Settings.settings file for? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
what files are these ?
hi every body
while reading about about coding with c# and asp.net i notice that
files which are (Settings.settings) and the other is
(Settings.Designer.cs) which in one of project layers what kind of
files are they and why he use them ??
Those are application settings, that can be easily edited as a cleartext, human-readable file, and which can be accessed during design-time (and runtime) as classes and properties.

What does the "series" represent for a chart [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Im busy creating some charts to go on my silverlight application and would just like to know what the .Series[0] represents in the following piece of code
PieSeries pieSeries = ((PieSeries)chart.Series[0]);
Did you check the documentation for the control you're using? What exactly are you having trouble with?
Sec, .Series[0] means to access the Series property, which is an array or list type or indexer, where you want to access the first (zero-based) element (0).

Changing tabs in C# code behind [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
When an event is fired from an element on one tab, how can I have the handler switch the view to a different tab.
I am looking for how to do it in C# code, not xaml. I have done research and cannot find a c# solution.
TabControl.SelectedIndex = <Integer index of the tab you want to display in the 0-based Tab array>

Categories