Skip to main content

General

  • All methods accept and use ISessionHandler

    • Eager loading used responsibly
    • IQueryable declared as internal
    • POCO created for SP
    • Search parameter array used
    • No DateTime values are passed to the database (different servers = different time = different results).
    • Domain Convention were followed.
    • Create a POCO Object when you want to call a stored procedure or view from Entity Framework. See example here
    • First, FirstOrDefault, Single, SingleOrDefault used for the correct purpose:
      • First - when one or more entities may be returned but only the first one is used (Remember to use OrderBy to return the correct entity)
      • FirstOrDefault - when none, one or more entities are returned, but only the first one is used (Remember to use OrderBy to return the correct entity)
      • Single - when only one entity will ALWAYS be returned
      • SingleOrDefault - when one or no entities are expected