Published Nov 17, 2020

Episode 435: Julie Lerman on Object Relational Mappers and Entity Framework

Julie Lerman delves into the intricacies of Object Relational Mappers, with a focus on the Entity Framework's evolution, discussing its transition to EF Core, improvements in data handling, and performance trade-offs, while offering strategies for optimizing applications using ORMs.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Performance

    The discussion on performance insights highlights the trade-offs between using ORMs like Entity Framework and writing raw SQL. explains that while ORMs simplify the development process by handling repetitive tasks, they may not always offer the best performance for complex queries. She shares an example where a stored procedure drastically improved execution time from two minutes to nine milliseconds, emphasizing the importance of choosing the right tool for specific tasks 1.

    There are just some places that any framework's just not going to be able to do something as well as your own SQL.

    ---

    adds that ORMs provide compile-time guarantees and auto-completion, which can be advantageous over raw SQL 2.

       

    Choosing ORMs

    Choosing the right ORM involves considering performance needs and application requirements. suggests that developers often default to using Entity Framework for its simplicity but may switch to lighter ORMs like Dapper for performance-critical tasks 3. She emphasizes the flexibility of using multiple tools, stating that developers should leverage their knowledge to select the right tool for each job.

    Just because you want to use any framework doesn't mean you have to use it all the way through.

    ---

    notes that Entity Framework allows for a mix of Linq queries, raw SQL, and stored procedures, providing a versatile approach to database interactions 4.

       

    CQRS Patterns

    The CQRS pattern offers a strategic approach to managing ORM performance considerations. describes how separating commands and queries can optimize performance by allowing Entity Framework to handle writes and Dapper to manage reads 3. This separation ensures that each task is performed by the most suitable tool, enhancing efficiency and maintainability.

    It's usually the queries where you need to really, really focus on the performance and worry about the performance.

    ---

    suggests conducting proof-of-concept testing to determine the best ORM strategy for specific application needs, as Entity Framework's performance can often exceed expectations 3.

Related Episodes