.net-3.5

How can i add a condition string to an sql query in an var type

Im working on an source code with an sql query in a VAR type like var query = select ... from ... where ... ; is it possible to add an dynamic "where clause" like string condition = "where x.x > x.y"; e.g. var query = select ... from ... + condition; Iam sorry for my bad english ...

LINQ performance

I am reading records from database and check some conditions and store in List<Result>. Result is a class. Then performing LINQ query in List<Result> like grouping, counting etc. So there may be chance that min 50,000 records in List<Result>, so in this whether its better to go for LINQ (or) reinsert the records to db and perform the que...

How to brand and license source code?

I have a open source .NET application. I want to brand it with my website and offer users to purchase a license to remove it. But how can I do this if I give out the source code? What is the best way to do this without effecting performance too? ...

Organize my domain objects in DDD while using ado entity framework

I have these 2 types of Users: Parents and Kids, both are Users, and have the same properties, but different methods. I Created Base User class and 2 class: Parent And Kid, both inherit form User base class, and each class have some different methods. User class is partial class, because the entity framework model has the same class bec...

Hang on starting WPF application

I am trying to debug a .NET 3.5 application which uses WPF. On most of our machines the application launches fine, but we have a single machine on which the application hangs on the first .Show(). The process seems to spin with full CPU usage, and eventually (if I'm attached with a debugger) I get: Managed Debugging Assistant 'Cont...

learning CSLA.NET framework

What will be a good start point for learning CSLA framework. ...

Is it possible to set an interval on FileSystemWatcher?

Out of curiosity, is it possible to implement an interval at which the various events are raised when using the FileSystemWatcher? Thanks! ...

How to delay parameter value calculation?

static class MyClass { static void Main() { bool b1 = false; if ( b1 ) { throw new MyException(GetText(b1)); } } public static string GetText(bool bFlag) { if ( bFlag==false ) { throw new Exception("'GetText' method should not be called when cond...

Telerik RadTreeView ScrollIntoView from Server Side Code

I created a Telerik RadTreeView and annotated in codebehind with two level of nodes. I could search and locate successfully for a node. Furthermore, I could ParentNode.Expanded and Selected the node. But I can never ScrollIntoView by codebehind. I found many links and threads on the internet but all used client side code. Any simple ...

How do delete a files that was just uploaded to server and is still locked by the server?

Hello all, My system Uploads files to an IIS server and then i manipualate them and after finished doing every thing, i need to delete the original file, the problem is that the IIS "grabs" the file and i can't delete it, when i close the procces i can delete it manualy from the server, but until i close the procces i can't even do that...

app.config in .Net3.5

Hi, I'm not able to write to the App.conf in .Net3.5. According to this question it goes like in .Net2.0, but it doesn't work. I can read from the config like this: var connStr = ConfigurationManager.ConnectionStrings[ApplicationConstants.CisConnectionStringName].ConnectionString But it's impossible for me to write in that file, b...

Thread-safe asynchronous code in C#

Hi all, I asked the question below couple of weeks ago. Now, when reviewing my question and all the answers, a very important detail jumped into my eyes: In my second code example, isn't DoTheCodeThatNeedsToRunAsynchronously() executed in the main (UI) thread? Doesn't the timer just wait a second and then post an event to the main threa...

What is the difference between these two....?

From a security stand point what are a couple major points that would aid in the result of using a .master file versus a .aspx file? ...

Upgrading existing windows applicatioon to .net 3.5 framework

Hi, We have a .net 2.0 windows application already deployed to client machines. Now, we have want to upgrade it to .Net 3.5 framework.But client machines may not have this new framework installed. Can someone please let me know how to achieve this using VS.Net setup and deployment project? Also, after deployment to client machine, whe...

Setting a foreign key value using Entity Framework .NET 3.5?

My table: Employee -------- Name Age Role int (foreign key) How can I assign a textbox value to the Role column? In Entity Framework 4 I would go: Employee x = new Employee() x.Role = textBox1.Text; It seems I don't have the Role columns available to me. Thanks. ...

Silverlight 3/WCF Communication over SSL Issue

I have a WCF over SSL service that works no problem. I am able to add a reference to this service to my Silverlight Project. Everything is hosted in IIS7. When My app runs I get the following error An error occurred while trying to make a request to URI 'https://wikittybam/BurgerCounter.svc'. This could be due to attempting to acc...

Does the WebClient class support changing the HTTP method to HEAD?

Does the WebClient class support changing the method to HEAD? I like the simplicity of using this class but if it's not that flexible then I will simply switch over to using the full-fledged HttpWebRequest and Response classes. ...

Read entire File Content asp.net???

Greetings everyone, i've been searching for awhile now and nothing seems to satisfy my desired output... All i want to achieved is to get the whole and same content of any file i uploaded, for my editing purposes in my editor w/c retrieves file from the database. i.e of files are ".doc and .txt"and by the way what i meant by same conten...

db4o - ignore specific class property

Hi, Is there a way (meta property maybe) to tell db4o to simply ignore a specific property of a class? I can't see anywhere to do that.. For my purpose I have a bunch of data entity that i need to persist now and then. I also sometimes need to hold a ref to a UI element associated with it, but I don't want db4o to persist that elemen...

TableAdapterManager does not contain "table adapter" and no extension method

I created a simple form that uses a typed dataset generated by Visual Studio (Express to be exact). I altered the default "Fill" query to pull in values from a few other tables and then tried to run my application and got the following error: TableAdapterManager does not contain "table adapter" and no extension method Prior to m...