C# Class DataLayer.DataClasses.SampleWebAppDb

Inheritance: DbContext, IGenericServicesDbContext
Afficher le fichier Open project: JonPSmith/SampleMvcWebApp Class Usage Examples

Méthodes publiques

Méthode Description
SampleWebAppDb ( ) : System.Collections.Generic
SaveChanges ( ) : int

This has been overridden to handle: a) Updating of modified items (see p194 in DbContext book)

SaveChangesAsync ( ) : Task

Same for async

Méthodes protégées

Méthode Description
ValidateEntity ( DbEntityEntry entityEntry, object>.IDictionary items ) : System.Data.Entity.Validation.DbEntityValidationResult

This does validations that can only be done at the database level

Private Methods

Méthode Description
HandleChangeTracking ( ) : void

This handles going through all the entities that have changed and seeing if they need any special handling.

SampleWebAppDb ( string connectionString ) : System.Collections.Generic

Method Details

SampleWebAppDb() public méthode

public SampleWebAppDb ( ) : System.Collections.Generic
Résultat System.Collections.Generic

SaveChanges() public méthode

This has been overridden to handle: a) Updating of modified items (see p194 in DbContext book)
public SaveChanges ( ) : int
Résultat int

SaveChangesAsync() public méthode

Same for async
public SaveChangesAsync ( ) : Task
Résultat Task

ValidateEntity() protected méthode

This does validations that can only be done at the database level
protected ValidateEntity ( DbEntityEntry entityEntry, object>.IDictionary items ) : System.Data.Entity.Validation.DbEntityValidationResult
entityEntry DbEntityEntry
items object>.IDictionary
Résultat System.Data.Entity.Validation.DbEntityValidationResult