C# Class DataLayer.DataClasses.SampleWebAppDb

Inheritance: DbContext, IGenericServicesDbContext
ファイルを表示 Open project: JonPSmith/SampleMvcWebApp Class Usage Examples

Public Methods

Method 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

Protected Methods

Method 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

Method 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 method

public SampleWebAppDb ( ) : System.Collections.Generic
return System.Collections.Generic

SaveChanges() public method

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

SaveChangesAsync() public method

Same for async
public SaveChangesAsync ( ) : Task
return Task

ValidateEntity() protected method

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
return System.Data.Entity.Validation.DbEntityValidationResult