Tag: HowTo

  • Generating history trigger with EF,edmx and TT files

    I have wrote in an older post ( http://msprogrammer.serviciipeweb.ro/2010/06/28/ef-automatic-history-of-table-and-t4-files-tt-files/ ) how to generate history code for tables . The easy solution was to create a tt file that track for the ObjectContext the SaveChanges for each table that has a “history” in name. the limitation is that,when you raise an sql command such as “update…

  • Logparser quick and dirty

    Sometimes you must find information in text files. Many,many text files,like IIS logs or other custom non-regular formats. I have a bot from http://www.imified.com/ – and I log the messages with log4net in text files,with another messages. An entry looks like that : System.ArgumentException: ;channel=private;botkey=<guid>;userkey=<guid>;user=name@yhaoo.com;network=Yahoo;msg=hello;step=1;value0=hello;to=asdasd And there are multiple log files that I want to…

  • My standard way to work with dropdown box in ASP.NET MVC – 2 steps (or 3 if you want to add long description)

    I have written a small post about dropdownlist template in ASP.NET MVC here : http://msprogrammer.serviciipeweb.ro/2010/05/30/mvc-helper-templates/ I think that the dropdownlist should be explained more – aand the example will be : First,let’s say we have Employee and Department. And we have Employee that has a field,named IDDepartment. When edit/create a user we want to display…

  • Monitor SqlServer Stored Proc execution time

    I have had the task to made something to monitor what stored procedure,in Sql Server,in most used. The problem that I have had is that the host_name is easily changed by putting,in the connection string WSID (see http://msdn.microsoft.com/en-us/library/ms178598.aspx ) The code is for sql server 2005 and I have not realized without the help of…

  • Caching in .NET

    In every application you have some data that is more read-more,write-once or twice. For example you can have the list of Cities of a country,the list of Countries of the world or list of exchange currency. This data is modified rarely. Also,you can have data that is not very sensitive to be real-time,such as the…

  • How To … Create a new site similar with regular internet site in Windows 7

      Step 1 : Make a Web site with Visual Studio Step 2 : In IIS Manager create the new site Step 3: edit the hosts file (administrative rights) Step 4: Create the Web application,modify his Project=>properties=>Web =>Use local IIS Web Server Step 5: Edit bindings for new site to point to the folder of…

  • How to … test database code with BDD(NBehave)

    In this video,that is the continuation after How To … Test code from database with nunit   I will show how to transform a NUnit test into an BDD – NBehave test. As usual,you can download the code from here here  

  • How To … Test code from database with nunit

    In this video we will test the Business Layer for a shortening application. The Data Access Layer is made with Entity Framework . You can download files from here    

  • How to – transmit data between Windows Forms

      You can download the project from here Also you can look to the video :   Very Short: Make a constructor on the form that has a parameter of the type you want to send. Do not forget the call to this( in order to execute InitializeComponent). Always verify on Load event that the…

  • How to … Make a bootable clone hard disk in Windows 7

    Disclaimer  : it is a short story of the long story from http://onegeekwithalife.blogspot.com/2009/11/booting-from-cloned-vhd-in-win7.html  Step 1 : Read http://onegeekwithalife.blogspot.com/2009/11/booting-from-cloned-vhd-in-win7.html  and confirm you have administrative rights to run programs. Step 2 : Download tools                           a) Disk2VHD from SysInternals,http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx                           b) VHD Resizer,http://vmtoolkit.com/files/folders/converters/entry87.aspx                           c) BcdVHD,http://disk2vhd.codeplex.com/ .                          d) Original Windows 7 disc with bootsect.exe Step 3…