Class Context
The database context for the bike data.
Implements
Inherited Members
Namespace: UnderDeskBike.Models
Assembly: UnderDeskBike.Data.dll
Syntax
public class Context : DbContext, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IDisposable, IAsyncDisposable
Properties
| Improve this Doc View SourceWorkoutEntries
Gets or sets the workout entries.
public DbSet<WorkoutEntry> WorkoutEntries { get; set; }
Property Type
DbSet<WorkoutEntry> |
See Also
| Improve this Doc View SourceWorkouts
Gets or sets the workouts.
public DbSet<Workout> Workouts { get; set; }
Property Type
DbSet<Workout> |
See Also
Methods
| Improve this Doc View SourceOnConfiguring(DbContextOptionsBuilder)
This method configures the database (and other options) to be used for this context.
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
Parameters
Type | Name | Description |
---|---|---|
DbContextOptionsBuilder | optionsBuilder | A builder used to create or modify options for this context. |
Overrides
See Also
| Improve this Doc View SourceSaveChanges()
Saves all changes made in this context to the database.
public override int SaveChanges()
Returns
Type | Description |
---|---|
int | The number of state entries written to the database. |