Entity Framework and SQL Injection

EF supports three types of queries( LINQ-to-Entities, Entity SQL , and
Native SQL).

LINQ-to-Entities queries are safe. This type of queries are not composed by using string manipulation, which makes it safe against SQL injection attacks.

Entity SQL and Native SQL are susceptible to SQL injection attacks. To safeguard your data, you must use parameterized queries instead of injecting literals from an external agent directly.

To learn all three types of queries visit here.

Read Microsoft documentation for complete EF security considerations.

Try .NET documentation generator for .NET Core

Try.Net gives ability to create interactive developer documentation with live code in it, which would allow your visitors to experiment and test code in the browser.

  • Write documentation in markdown file.
  • Reference code in the markdown file from .net core projects.
  • It’s completely client side. Only browser is needed.
  • IntelliSense support.

Visit GitHub page for samples and more details: https://github.com/dotnet/try

Create a website or blog at WordPress.com

Up ↑

Create your website with WordPress.com
Get started