New answers tagged

2

Sometimes breaking things up into smaller manageable chunks makes them easier to swallow Break the responsibilities up into more focused concerns. public static class PrincipalExtension { /// <summary> /// Retrieves the Firm Id claim if it exists /// </summary> public static long? GetFirmId(this IPrincipal principal) { ...


4

You are close. The only thing that jumps out at me is your use of the MembershipFormRepository type instead of the IMembershipFormRepository interface. This prevents you from being able to test consumers of it easily. For example, consider this case: You have an object of type Foo that takes an injected instance of type Bar that takes an injected instance ...


Top 50 recent answers are included