In C#,
How would one go about spawning multiple threads and then sequentially adding results to a list before returning the entire result set?
What are some best practices?
I'm so far using an ManualResetEvent to signal when the last element has been processed by a thread.
But when it returns, I need to have them consolidate the resu...
I am looking for an automated way to iterate over all ObjectQueries and set the merge option to no tracking (read only context). Once i find out how to do it i will be able to generate a default read only context using a T4 template. Is this possible?
For example lets say i have these tables in my object context
SampleContext
Tab...
We're excited at the prospect of upgrading our development IDE from Visual Studio 2008 to 2010. Our production environment, however, is not scheduled to be upgraded from .net 3.5 sp1 to .net 4.0 in the near future.
What are the possible risks in using Visual Studio 2010 to develop production grade applications that will actually run on...
Background - I am trying to use the friendly adapters to override the default styling for the standard asp.net menu control that is used by an existing project. The existing project functions normally and compiles when requested without incident. Adding in the code for the for the CSS Friendly adapter and not only does it not compile, ...
When to use Response.Flush? Do I need to call it every time before I call Response.End?
...
I have a situation where I am providing a method to query for data in various ways. We provide the user with 4 different fitler criteria and they can mix and match as much as they want.
For example:
public Fruit GetFruit(Boolean isLocal, string storeName, string classificationType, string state);
This is simple when all of the attr...
Okay... I'm writing a .NET CF (VBNET 2008 3.5 SP1) application, which has one master form, and it dynamically loads specific UserControls based on menu click, in a sort of framework idea.
There are certain methods and properties these controls all need to work within the app.
Right now I am doing this as an Interface, but this is aggrav...
Hi,
I think I'm missing something fundamental. Please tell me what it is, if you can.
I have developed a little C++ WinForms app using VS2008. So it is built using .NET 3.5 SP1.
My development box is Win7, if that matters.
The default value of UseCompatibleTextRendering property in WinForms controls is false in this version of VStudi...
Hi
I'm seeing odd behaviour using the StreamWriter class writing extra data to a file using this code:
public void WriteToCSV(string filename)
{
StreamWriter streamWriter = null;
try
{
streamWriter = new StreamWriter(filename);
Log.Info("Writing CSV report header information ... ");
streamWriter.Writ...
Hello.
Vierd behaviar when passing values to and from 2nd form.
ParameterForm pf = new ParameterForm(testString);
works
ParameterForm pf = new ParameterForm();
pf.testString="test";
doesn't (testString defined as public string)
maybe i'm missing something? anyway i'd like to make 2nd variant work properly, as for now - it returns...
I have a problem. The thing is that I am using Visual Studio 2005 and .Net Framework 3.5 sp1. I have created the app and I want to have the .Net Framework prerequisite installed before however I can only select 2.0 . This wont go well since some columns in some of my grids will be arranged differently along with other problems. Is there ...
Background WCF Stack, Data Access Implemented in Entity Framework, Simple ASP.NET Front End
This is a two part question.
Recently we ran into an issue with periodic crashes with an exception that read:
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified ne...
I'm performing a LINQ to Entities query (.Net 3.5 SP1) as follows:
...
var blah = from obj in myEntities.Objects
where...
select obj;
return blah.Count();
When I look at the resulting SQL in the SQL profiler, the query is calling a SELECT on a result set, not a Count. From a performance perspective, this is 10x slower than doing a ha...
I'm getting the following error when I call the SaveChanges() method on my entity context:
Culture 'en' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture.
My browser culture is set to en-us and so is my OS (tested on windows 7, vista and server 2003).
using(Su...
Using Win7 32-bit for 3 months and didn't have problem with developing any .NET-based applications including ASP.NET apps.
Just upgraded my laptop's RAM 3 days ago and switched to 64-bit version of Win7.
When I'm working on installing IIS7 and .NET Framework 3.5 SP1, there's an error about not all features were installed for some unkno...
Hi,
I want to use NHibernate with Asp.net 3.5 but i don't know how to use it.I search on
Google but couldn't find the complete explanation about why to use NHibernate,Advantages of using it and integration with Asp.net projects.Please Help me.
...
I was given XML files I believe were generated from an oData service endpoint with the $metadata url parameter.
My question, how do I take these files and generate classes? Or am I thinking about this all wrong?
Be advised, these XML files were emailed to me.
Cheers!
...
Hi there
I'm using a cms (mojoportal) and want to install it on a webserver, this webserver has .net 3.5 sp1 installed (a requirement for it to run), and my pc that i compile the project also has 3.5 sp1 (im using windows 7, it comes with 3.5 sp1)
Though I'm getting an error that i know only comes up when the cms is running on 3.5. I b...
How do I recreate the following XAML databinding in code? I have most of it except for the DataTemplate definition.
Here is an example of the DataBinding in XAML
<GridViewColumn Width="140" Header="Name">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding Path=Label}" />
...
Question
I'm using .NET 3.5 SP1 and EDM. Instead of using the EDM designer tools to map functions to stored procedures at design time (code generation), I'd like to map functions programmatically when the EDM container and entities are instantiated.
Reason
I literally have dozens of stored procedures in the data source to map by hand, b...