Category: tools
-
MVC Zip Result
Sometimes you need to send to the user more than 1 file – or,maybe,the file is too large The simplest way is : made a zip file that contains the others. What do you need 1. SharpzipLib from http://www.icsharpcode.net/opensource/sharpziplib/ ( or download via NuGet in VS) 2. obtain the file(s) that you want as a…
-
EF Profiler and investigating object context
Summary : EF Profiler worth his money ! Long Description : I have finished a application with Entity Framework and POCO – and custom generated (.tt) files. Now it was time to investigate performance – and it was a terrific problem. How EF Prof helped me : 1. Displaying number of ObjectContext created and disposed…
-
file helpers
More than one time you need to let users / application import bulk data in your system . I have had many cases – data is old data from old software,that is exported in some text files,usually csv. In order to import fast the data,I used FileHelpers from http://www.filehelpers.com/ Let’s say you have the following…
-
Selenium and testing WebInterfaces
On some cases you need to test the whole web interface. Why ? Suppose you have some Ajax call. You can test the call on server,but how do you ensure that user experience is OK ? There are several testing projects for Web – for example selenium and Watin I will show how to test…
-
Entity Framework profiler
Many times I’ve had problem with the following error when inserting objects with dates with Entity Framework : System.Data.UpdateException An error occurred while updating the entries. See the inner exception for details.SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. Ok,it’s my faute – but to remember each one date is too…
-
Logging and instrumentation
Why There are at least two reasons for an application to register what tfhe user do. The first one and the most important is to see what is happening when a user has an error: what have been done,on which path did he go and what additional data(method parameters,usually) do you need for reproducing the…
-
Html Agility Pack
This is the ultimate reference of reading web pages. IF you want to do it yourself,you can try with WebRequest,http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx . But not all HTML is an XML – so you must find a method to parse. But am I the only one ?No – so I found the HTML Agility Pack,http://www.codeplex.com/htmlagilitypack,that knows how to…