Code Review Quiz
I’ve been following Ayende’s series of reviews on the Microsoft N Layer App Sample V2. His most recent post in the series explored a little bit of the data access layer in the app. Specifically, this interface (which has since been removed):
public interface IMainModuleUnitOfWork : IQueryableUnitOfWork { #region ObjectSet Properties IObjectSet<BankAccount> BankAccounts { get; } IObjectSet<BankTransfer> BankTransfers { get; } IObjectSet<Country> Countries { get; } IObjectSet<Customer> Customers { get; } IObjectSet<Order> Orders { get; } IObjectSet<OrderDetail> OrderDetails { get; } IObjectSet<Product> Products { get; } IObjectSet<CustomerPicture> CustomerPictures { get; } #endregion }
I couldn’t find the source for the IQueryableUnitOfWork base interface, but I assume it exposes a significant amount of methods and properties.
Ayende alluded to the fact that this interface has several significant problems with it, but didn’t go into detail. So I thought that this would be a good opportunity for a quiz. How many wrong things can you spot with this interface?
I counted at least 6 major problems, though I’m sure there are a few others.