zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

5 results in tag: validation

How to add Data Validation in EF Core with Database First approach?

I am implementing a MVC-Webapplication with ASP.NET Core (RC2) and as ORM Entity Framework Core. Since I already got a database design, I have to create the entity models by the Scaffold-DBContext command....This works fine. Now, I want to add some annota...
c# ef-database-first entity-framework entity-framework-core validation
asked by user1885888

ASP.NET and EF Core - ModelState.IsValid always returns true for models generated by Scaffold-DbContext

I've been unable to validate models generated by the Scaffold-DbContext command in my ASP.NET Core controllers....The required/max length property configurations are all in the onModelCreating method of the context class that EF core generated. ...protect...
asp.net-core-mvc entity-framework-core validation
asked by user7003875

Entity Framework GetValidationErrors empty for unique index

I want to check for validation errors before I save the context. I call context.GetValidationErrors(), which is empty, then I call context.SaveChanges() and I get the error for a duplicate row for my unique index....using(var context = new DefaultDbContex...
.net c# entity-framework entity-framework-6 validation
asked by Tony

how to change type validation error messages?

I'm using entity framework code first in an ASP MVC project, and I'd like to change the error message that appears for validation of a numeric type....I have a property like...public decimal Amount1 { get; set; } ...If I enter a non-number in the field, I...
c# data-annotations entity-framework entity-framework-6 validation
asked by Mike

Query database and unsaved changes for validation with Entity Framework 6

I have a data layer using Entity Framework 6 ...Database First.... One of my entities represents a time span - it has a start date and an end date....public class Range { public Guid ID { get; set; } public DateTime StartDate { get; set; } pub...
entity-framework entity-framework-6 validation
asked by xr280xr

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!