When I say this
using (Entities db = new Entities())
{
return db.TableName.AsQueryable().ToList();
}
Do I by-pass the functionality of using block since I return something, and the method exits before exiting the using block, so I think the using block will not serve to its purpose and dispose the resource.
Is this correct?
...
Good afternoon,
I am generating a typed dataset from a stored procedure. The stored procedure may contain something like:
select t1.colA, t2.colA AS t2colA
from t1
inner join t2
on t1.key = t2.key
When I generate the typed dataset, the dataset knows whether t1.colA allows NULLs, but it always puts FALSE in AllowDBNull for ...
This seems like it should be a fairly straightforward question, but I can't find an answer anywhere.
I'm using php's DOTNET class to instantiate a class from a .dll created with C#. The constructor of that class requires a couple of parameters. How to I pass them?
Other Info: This is currently on Windows, and I've registered the .dll...
hello
I have my own textbox which inherits System.Windows.Forms.TextBox
I am trying to display texts like 5000000 formatted ==> 5,000,000
but the problem is that Control.Text should return 5000000 but it should display 5,000,000.
I know it is WTF, but i really need it and i couldn't Google a lot because my native language is not Engl...
I created a web app and I want the users of the app to use limited functionality free.
Or I might even decide down the road to enable free users to use the app for no more than, say 10 days.
is there a library or framework which helps with such issues ?
...
I'd like to implement a feature in my application where show a dialog to the user, and the main form (similar to how jQuery looks). My only idea is to take a screenshot of the form, place it as the background of a panel (with opacity to my liking) then pushing the panel over everything on the form. I have to believe there is a better w...
Hello(здравствуйте)
I’m a PHP developer, my current job is maintaining a few web sites.
So I have some free time and thoughts about developing some GUI applications using the c# language and .NET platform. Implementation of this applications requires libcURL functionality.
Are there any .net classes or third-party libs in c#, that can ...
I have a custom validation in the enterprise validation block. The DoValidate method is as shown below.
protected override void DoValidate(Double objectToValidate, object currentTarget, string key, ValidationResults validationResults)
{
if (!IsSalMoreThanMinWage(objectToValidate))
{
//Here I need to mark this messa...
I am using a custom error page in IIS 6:
<customErrors redirectMode="ResponseRedirect" mode="On" defaultRedirect="Error2.aspx"/>
I want to disable authentication for the custom error page because the error being raised is related to an authentication module and I don't want to get into an infinite loop and I want to display a clean er...
I have a set of text files. I want to calculate a content uniqueness for different subsets.
E.g. we have 10 documents (A1 - A10) and want to calculate the uniqueness for subset of documents A1 and A2. So the result must be some value from 0 to 1 (1 - absolutely unique content, 0 - absolutely duplicated content).
What methods for conte...
To me, as a developer and as a user, I find the empty string ("") useless and the cause of much confusion, it's like saying string == char[]
Maybe computers need the empty string, so I'd like to learn why.
See also:
Default string initialization: NULL or Empty?
Best Practice: Should functions return null or an empty object...
All,
I have a simple class.
public class Container : UserControl
{
public bool IsClickable { get; set; }
}
I have a class that extends this class.
public class ScrollingContainer : Container
{
public void Draw()
{
}
public void Update()
{
}
}
I have a custom class, that then extends ScrollingContaine...
In the project I'm currently working on there is a need to save a sizable data structure to disk (edit: think dozens of MB's). Being an optimist, I thought that there must be a standard solution for such a problem; however, up to now I haven't found a solution that satisfies the following requirements:
.NET 2.0 support, preferably with...
Hello,
I want to add a column to a gridview which contains button control. I am using ID(integer and primary key) as the 1st column of Gridview. What I want is that when a user clicks the button on any given row of gridview, I want to able to determine the ID of the row to which the clicked button belongs
Vam Yip
...
When I try recording audio following this here, and using the related source code from here in the (voicerecorder.audio project), I face the problem that the recording stops within moments of starting and so does the playback. the recorded file is 46 bytes, and playback is there for less than a second, basically, the thread jumps to t...
I'm wondering, in Visual Basic 2008, how to execute an external dos command and get its output without help of an intermediate file (to speed up)?
...
Is there any kind of framework that provides some generic mechanism for integration between applications or something similar? By integration I presume data exchange (import and export) between two applications via some standard interface like Web Service.
...
The application I'm developing communicates with an digital audio device, which is capable of sending 24 different voice streams at the same time.
The device is connected via USB, using FTDI device (serial port emulator) and D2XX Drivers (basic COM driver is to slow to handle transfer of 4.5Mbit).
Basically the application consist of ...
I'm using Fit/Fitnesse. I have a column fixture that looks like this.
!|Get Stepstools Medication Id From Vocab and String|
|Concept As String|Vocabulary Name Abbr|Vocabulary Concept Id|Stepstools Med Id?|
|AMOXICILLIN|RXNORM|723|1|
|AMOXICILLIN| | |1|
|AUGMENTIN|RXNORM|151392|8|
|AUGMENTIN| | |8|
|Amoxicillin 1000 MG / Cl...
Hello all! I'm trying to create an instance of a generic class using a Type object.
Basically, I'll have a collection of objects of varying types at runtime, and since there's no way for sure to know what types they exactly will be, I'm thinking that I'll have to use Reflection.
I was working on something like:
Type elType = Type.Get...