Creating Database LocalDb – Local dev-only version of SQL Server Project -> Add New Item…. -> Installed -> Data -> Sql Server Database Createa an .mdf file SQL Server Data Tools (SSDT) -> Tools to create and manage SQL Server databases from Visual Studio. Creating an Entity Model Entity Data Model – Object Relational MapperContinue reading “C# – Creating a Database and an Entity Model in Visual Studio 2013”
Author Archives: Deniz Karadal
C# – Understanding Global Exception Handling
Unhandled exception bubble up until they are exposed to the end user (aka “yellow screen of death”) Best place to handle exception is the nearest locale to the exception itself. However, You CAN handlig globally. In global.asax Understanding Custom Exceptions Inherit from Exception like so:
C# – Understanding Exception Handling
Wrap try …… catch around code: That you are calling into you did not write Code that accesses external recources Code that accepts input from outer sources
C# – First Pass at the Separation of Concern Principle
Separate concers at the mitigate the impact of change on a software system. Common “concerns”: Presentation logic Business / Domain logic Persistence logic Recommendation: Seperate concerns into projects within a given solution. Naming convention: MyApplication(Solution name) MyApplication.Presentation(.Web, etc. presentation project) MyApplication.Domain(domain/business rules project) MyApplication.Persistence(.Data, .DB persistence project)
C# – Understanding the Switch Statement
Think: train switch… logic based on evaluation of a variable or property value.