DEV Community

loading...

Should I use SQL Views With ORM frameworks?

Hassan Bazuhair
I am C# developer and Nodejs Typescript developer
・1 min read

I want to Ask, Is it good to use SQL View with ORMs Like Entity framework? And Why?

Discussion (1)

Collapse
rramname profile image
Rohit Ramname

Absolutely. View without built in filters is always a good idea over directly referencing tables especially with EF. This way we dont have to worry about table changes like adding non null column (This could bite us in case of inserts with direct table references).