Quick Tip – Making Beep From the PC Speaker Using P/Invoke

February 26, 2010

Quick Tip – Making Beep From the PC Speaker Using P/Invoke I was asked yesterday how can we perform a beep sound from the PC speaker. This is  something that is needed in one of the  applications that I’m consulting for to indicate a successful transaction (don’t ask me way…).  Setting the Environment We first need to add the using for Runtime.InteropServices: using System.Runtime.InteropServices; Then load the unmanaged...
2 comments

Entity Framework Evolution in .NET 4 at DevAcademy4

Entity Framework Evolution in .NET 4 at DevAcademy4 As I wrote yesterday DevAcademy4 is coming next month. My part in the conference will be a breakout session on EF4. In the session we will explore the major changes that EF4 offers and how they can contribute to develop better data access layers. There are other great sessions in the conference which you can review ...

Developer Academy 4 is Coming

February 25, 2010

Developer Academy 4 is Coming The biggest Israeli .Net developers conference is coming. Today the conference site of Developer Academy 4 was launched and you can sign in to the conference from here. You can also register as a fan in Facebook from here for online updates. This year the conference will be focusing on Visual Studio 2010, Windows Azure and Silverlight. There are going to be many breakout sessions and also mini sessions which will include only demos.The conference will occur in March 22, at the Airport City in Israel.  See you there!

Closing Another Year

February 9, 2010

Closing Another Year Another year of writing is over. A lot has happened in my life during the last year. Here are some highlights: I have a new baby boy at home :-) I received a MVP award from Microsoft. I started to work in a new  company – Sela Group. And many more. Few Stats About my Blog ...
one comment

Back to Basics – Using MasterType Directive

February 8, 2010

Back to Basics – Using MasterType Directive This post is a result of a question that I got from one of the developers that I work with. The question was how to use master page properties from an ASP.NET page. Setting the Environment The first thing that you want to do is to expose the properties as public in the master page. For example this is code behind...
2 comments

Entity Framework Context Lifetime Best Practices

February 7, 2010

Entity Framework Context Lifetime Best Practices In this post I’m going to write about one of the major decisions that you need to take when you use ORM tools like Entity Framework. This decision is the context lifetime. The Problem Context lifetime is a very crucial decision to make when we use ORMs. Since the context is acting as an entity cache (it holds ...

Using Unit of Work Pattern with Entity Framework

February 5, 2010

Using Unit of Work Pattern with Entity Framework In a previous post I explained how to create a simple repository on top of Entity Framework. In this post I’ll explain the Unit of Work pattern and how we can use it with our data access layer. What is Unit of Work Pattern? In his famous and developer must read book “Patterns of Enterprise Application Architecture”,...

To Use OSS or Not to Use?

February 3, 2010

To Use OSS or Not to Use? This post is a result of a very big discussion I had with a customer that I’m currently consulting for. The discussion started because a project reached its testing phase and to my surprise the QA team worked with… (don’t be shocked) a primitive excel file to manage bugs. The testing phase was taking to long because of things like concurrency (two users can’t edit the excel file at the same time), synchronization of the same file and many other multi-user or files problems. Since in my opinion the situation couldn’t go on...
4 comments

The Regulator

February 2, 2010

The Regulator Yesterday, I reviewed a regular expression that was written by one of the developers and I needed to improve it since it wasn’t performing the appropriate thing. Since I know The Regulator tool, I opened it and in 5 minutes I came up with this regular expression which validate Israeli phone/cellular numbers: ^0(5|6|){1}(\-)?{1}\d{6}$ With The Regulator I created and checked the expression and then implemented it in the application. What is The Regulator? The Regulator is a free tool that was written by Roy Osherove. It’s purpose is to help us create regular expressions and also to test them inside...
one comment

Error CS0029: Cannot implicitly convert type Using WSDL Tool

February 1, 2010

Error CS0029: Cannot implicitly convert type Using WSDL Tool Today I was asked by one of developers I work with to check an error he got after he generated a proxy class with the wsdl.exe tool from a third party wsdl he got. The error was generated in runtime when he tried to use the generated class and it was something like: Unable...
4 comments