Is it possible to pass a SQL script to some method that Entity Framework has to run it against my model? e.g. equivalent of:
context.ExecuteStoreCommand(<tsql script path>);
Background: I want a way to reset the database during unit tests, and making a call to run the EF generated TSQL script (from Generate Database from Model) seem...
Hi,
what test data approach/framework is recommended for .net unit testing? I'm in VS2010, C#, doing business logic layer testing.
By approaches I mean like: creating database snapshots, programmatically creating each time, etc etc. Like what approach to use to ensure at the start of each test the database is in a known state.
...
What I'm currently trying to do is make a very basic webchat for irc using silverlight.
Basically how I'm trying to do it is have a tcp server listening for connections from silverlight. When a client connects it creates a new connection to irc and data is passed to/from the client/irc via the server application.
I've gotten it to work...
Hi all, I'm new to .Net and am trying to setup dotNetOpenID. I'm simply trying to get the following line to build ok without getting any errors:
var openIdRelyingParty = new OpenIdRelyingParty();
Currently when I build, I get the following error:
The tpe or namspace name'OpenIdrelyingParty' could not be found (are you missing a usin...
Hello I am having trouble using multiquery in facebook .net.
I am trying to create 3 queries: Friends, Like and Photo using multiquery in the toolkit. It returns me with this The remote server returned an error: (500) Internal Server Error. Although, it is not happened all the time but it does occur frequently... I thought about what ca...
Our requirement is being able to integrate our DLLs with ClickOnce. Dotfuscator does the obfuscation job nicely but the obfuscated DLLs cannot be deployed with ClickOnce on customer side. On our side, we can handle it perfectly. Moreover, the obfuscated assemblies sometime crash our .NET CF app. It turns out to a solution that creates a ...
I'm writing a program in F# at the moment, which I specified in the Visual Studio project setup to target .Net 3.5, this being the highest offered, on the theory that I might as well get the best available.
Then I tried just now running the compiled program on an XP box, not expecting it to work, but just to see what would happen. Unsur...
Can you recomend any PDF API for C#. Free is the best, but i dont mind paying for it.
...
Hi All,
I am not sure whether it is possible to achieve this kind of implementation in Dot Net. Below are the information
Currently we are on an application which is done in COM+, ASP, XSL, XML technologies. It is a multi tier architecture application in which COM+ acts as the BAL. The execution steps for any CRUD operation will be def...
Is it possible using Eval? If so, can someone post a short fragment to illustrate? My SqlDataSource returns 1 record with 3 fields, I'd like to Format these into a string. eg:
Record
Field 'Name' = 'Jack'
Field 'Amount' = 100
Field 'Date' = 12.02.2010
asp:Label text should end up being:
Welcome Jack, last payment was 100 on 12.0...
hi,
I was just wondering why do we need installer programs to create setups?
We can create a desktop application which will do registry changes, registration of assembly, creation of config files and all.
Why dedicated installers are there? Do they serve any other purpose or task that a desktop application cannot do?
...
I'm looking for a way to write an SQL statement in C# targeting different providers. A typical example of SQL statements differentiating is the LIMIT in PostgreSQL vs. TOP in MSSQL.
Is the only way to solve SQL-syntax like the two above to write if-statements depending on which provider the user selects or using try catch statements as ...
Hi there.
I'm trying to programmatically send a POST-request to a web-server in order to login an then perform other requests that require a login.
This is my code:
byte[] data = Encoding.UTF8.GetBytes(
String.Format(
"login={0}&password={1}&authenticity_token={2}"
+"&login_submit=Entra&remember_me=1",
...
Hello everybody
I am trying to implement an ihttphandeler for streaming files. files may be tiny thumbnails or gigantic movies
the binaries r stored in sql server
i looked at a lot of code online but something does not make sense
isn't streaming supposed to read the data piece by piece and move it over the line?
most of the code seems to...
Since 2005 as I googled it's a problem for who needs to read the configuration of an assembly from it's config file "*.dll.config" and Microsoft didn't do anything yet.
Story: If you try to read a setting from a class library (plug-in) you fail. Instead the main application domain (EXE which is using the plug-in) config is read and beca...
In the following code, the const are defined using two different ways.
const float KS = 0.001F;
const float WW = 0.001f;
Is there any difference between F and f?
Revision 1:
If both are same then why both cases are allowed ?
...
I'm new to MVC and ADO.net Entity Framework. Instead of having to create an edit/display for each entity, I'd like to have the controller base class generate the view and validation code based off metadata stored in a table - something along those lines.
I would imagine something like this has already been done, or there are good reas...
Hi,
What is the difference between accessing a property through page["propertyName"] and page.Property["propertyName"] in EPiServer?
Thanx!
...
i am new to program,and our teacher asked us to write a small program witch using sqlserver;
so i use visual studio 2010 c# to write it,but i meet a problem:
i don't know how to make a setup file.because i put the SqlConnectionString in the code file directly;so,even i have publish the program ,the sqlconnectionstring didn't change,it di...
using (TransactionScope scope = new TransactionScope())
{
int updatedRows1 = custPh.Update(cust.CustomerID, tempPh1, 0);
int updatedRows2 = custPh.Update(cust.CustomerID, tempPh2, 1);
int updatedRows3 = cust.Update();
if (updatedRows1 > 0 && updatedRows2 > 0 && updatedRows3 > 0)
{
scope.Complete();
}
}
...