Browse by Tags
All Tags »
DEV (
RSS)
EF Evolution in .Net Framework 4 On next Monday I’m going to give a session about EF4 in the DevAcademy4 conference. The session will provide you details about why you will want EF in your application, which development approaches EF provides and how to apply them and the major tooling and functionality enhancements. If you are interested in the subject go to the DevAcademy4 web site for more details. Meet you there!
MIX10 – Last Day Wrap up The last day of MIX has arrived and in this day we haven’t had a keynote session. The first session I went for was Building Great Standards-Based Websites for the Big Wide World with Microsoft ASP.NET 4 . A very big title for a session about XHTML, usability and accessibility which are things that you are require to do when you develop major sites. The lecturers showed an Australian site which was developed with standards. Also they showed an nice open source framework that...
MIX 10 – First Day Wrap up As I wrote earlier this week I’m attending the MIX conference at Las Vegas. This is a summary of the first day I had in the conference. The day started with a keynote session by Scott Guthrie . The keynotes included information about Silverlight 4 , Windows Phone 7 and more. Lots of cool demos and exciting news for web developers. After the keynote I went to the Building Offline/Cache mode web Apps using Sync Framework session with Mike Clark . The news here are the OData...
Performing Queries Against Active Directory Domain Services One of the missions that needed my attention lately was to check whether a user exists in an enterprise Active Directory . The post will show exactly how to perform such a query. The DirectoryEntry Class The DirectoryEntry class represent an entry in Active Directory . That entry live in memory when created and changes that you perform on it won’t be submitted to Active Directory unless you call the CommitChnages method. That class can be...
Discover which Control Raised a PostBack Yesterday I needed a solution for an annoying problem. I have some buttons on a ASP.NET web form and I need to know which button raised the postback not in the event itself but in the page load event. This post will show a way to solve this conundrum. Discover which Control Raised a PostBack When we use ASP.NET and we have ASP buttons on the page if we want to do something before their postback event happen we need to discover whether they raised a postback...
CompiledQuery in Entity Framework There are times when we want to make optimizations on some piece of code. If we want to reduce the cost of executing a query in Entity Framework we can use a CompiledQuery to the rescue. Yesterday I used added a compiled query to a code base which was executing multiple times. This reduced the execution time of the repeating queries. In the post I’ll explain what are CompiledQueries and how to use them. CompiledQuery CompiledQueries are a delegate which store a compiled...
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 dll of kernel32.dll with the method signature for Beep which...
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 from here . See you there!
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...
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 of a simple master page that exposes the IsPageEnabled property: public partial class Site1 : MasterPage { #region Properties public bool...
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 ORM s. Since the context is acting as an entity cache (it holds references to all the loaded entities for change tracking and lazy loading purpose), it may grow very fast in memory consumption. Also this...
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 ”, Martin Fowler defines the Unit of Work as “Maintains a list of objects affected by a business transaction and coordinates the writing...
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[012345678]|6[47]|[23489]){1}(\-)?[^0\D]{1}\d{6}$ With The Regulator I created and checked the expression and then implemented it in the application. What is The Regulator?...
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 to generate a temporary class (result=1). error CS0029: Cannot implicitly convert type 'A' to 'A[]' After searching in the internet I found that there...
Entity Framework at Sela Open House Yesterday, even though I’m currently sick (I have the flu), I delivered a session about Entity Framework at Sela Open House event. In the session I introduced Entity Framework , talked about the EDM , explained how to query and manipulate data and in the end talked about what is coming in EF4 . I want to thank all the attendees who came to hear the session. As I promised, I uploaded the session slide deck and demos to my SkyDrive and you can download them from...
More Posts
Next page »