Goodbye GoodCore, Welcome DevEnhanced

I have been working at GoodCore Software for more than 4 years. I have had a great time here and learned so much from my colleagues. But I have decided to try something new – Starting July 2011, I have co-founded a new company, DevEnhanced, with my friend Fawad Moon.

Of course, there is never a good time to leave, but I feel satisfied with my tenure at GoodCore. I recently accomplished an enterprise educational content management system that involved all the latest .NET 4 flavors: WPF, Silverlight and ASP.NET were used for user interface, WCF for communication, Entity Framework for data access and SQL Server for storage. I was involved as the lead architect and gained a lot of experience and knowledge while working on the project.

Apart from handling some .NET projects at GoodCore, I also looked after few business intelligence and data warehousing projects. I utilized SQL reporting services and highly complex TSQL queries for dashboards and analytical reports, SQL Integration services for data extraction, transformation, loading, aggregation, integration and migration, and SQL Analysis services for building multidimensional structures, cubes and analytic solutions.

In this post, I would like to thank all the great folks at GoodCore for their support, cooperation and guidance. I hope the company will continue to have a positive reputation in the software industry.

Now I look forward to a new venture at DevEnhanced that brings forth new challenges and will add more diverse experience to my career. Please do remember me in your prayers and best wishes.

WCF RIA Service adding extra Required attribute on generated classes

Few days back, I upgraded a Silverlight 3 RIA application to Silveright 4 bits. Once I fixed all the errors, it appeared that RIA generated entities were “over-validating” themselves. I noticed that all the string entities that were marked not-nullable in database were giving validation errors saying "Field XYZ is required". Read the rest of this entry »

Silverlight (and WPF): How to make items stretch horizontally in a ListBox

Sometimes we need to use controls like TextBox, TextBlock etc (that set their width automatically depending on content) in a ListBox’s ItemTemplate. If we need to draw Borders or assign Background colors to each such controls then we may end up having non-equal rows. Read the rest of this entry »

C#: Fun with Indexers

This post refers to an interesting situation when you create a class in C# with an indexer and a property named “Item”. Let’s see why this is not possible simultaneously.
Read the rest of this entry »

Posted in Dotnet. Tags: , , . 6 Comments »

RIA Services: Sending complex types to the client

Entity Framework 4 allows us to create complex types. Typically, such types are used to get the result of a stored procedure. However, when we try to send such a complex type using a WCF RIA Domain Service, the following error is encountered.

The entity ' StoredProcedure_Result' in DomainService 'MyDomainService' does not have a key defined. Entities exposed by DomainService operations must have at least one public property marked with the KeyAttribute.

What to do? Read the rest of this entry »

DataContractSerializer: Working with class inheritence and circular references

DataContractSerializer is the default serializer used by WCF Services. Typically, we transmit data objects generated via Entity Framework or LINQ To SQL and do not get any serialization issues as the generated classes are ready to handle various serialization scenarios. Some days back, I needed to transmit my own business objects on the wire; encountered a few issues and learned how to handle them. This post will highlight two such issues that may happen when we transmit our own classes via WCF service.

  1. Dealing with inheritance hierarchies
  2. Dealing with circular references

Read the rest of this entry »

WCF Service: Getting to the cause of error

If you are using WCF service as your mode of communication between client-server applications (and why shouldn’t you, this has been a great source of communication available since .NET 3.5), then there are chances that something wrong happened and you get a generic Communication Exception at your client. This post will highlight how to find the cause of such error.
Read the rest of this entry »

ReportViewer control: Look out for appropriate version when using in Server mode (Remote Processing)

The report viewer control (available for Windows Forms as well as ASP.NET applications) is used to display reports in our applications. However, it was an interesting observation for me that the ReportViewer control can connect to specific SQL server versions when used in Server Mode(or Remote Mode). Read the rest of this entry »

TSQL: Some interesting usages of Coalesce

The coalesce function is a really powerful function that can help us in various scenarios. It is described in this MSDN document so I am not going to discuss its working in this post. Instead, I will only present a few interesting usages.

  • Calculating overrideable attributes
  • Combining results from Full Outer Join
  • String concatenation

Read the rest of this entry »

Entity Framework: Queries involving many to many relationship tables

Entity framework handles tables participating in Many to Many relationship in a nice manner. If the junction table (sometimes called bridge table, association table, link table, etc) only consists of the foreign keys and no other columns, then that table is abstracted by EF and the two sides get a navigational property exposing a collection of the other side. If the junction table contains other fields as well (e.g. the table has its own primary key column), then that junction table is included in the model with many-to-one relationships with both the participating tables. This post will present some common LINQ queries involving the many to many relationship tables in both scenarios: when the junction table is abstracted by EF, and when it is exposed. Read the rest of this entry »