Under Desk Bike

    Show / Hide Table of Contents

    Class Context

    The database context for the bike data.

    Inheritance
    object
    DbContext
    Context
    Implements
    IInfrastructure<IServiceProvider>
    IDbContextDependencies
    IDbSetCache
    IDbContextPoolable
    IResettableService
    IDisposable
    IAsyncDisposable
    Inherited Members
    DbContext.Set<TEntity>()
    DbContext.Set<TEntity>(string)
    DbContext.ConfigureConventions(ModelConfigurationBuilder)
    DbContext.OnModelCreating(ModelBuilder)
    DbContext.SaveChanges(bool)
    DbContext.SaveChangesAsync(CancellationToken)
    DbContext.SaveChangesAsync(bool, CancellationToken)
    DbContext.Dispose()
    DbContext.DisposeAsync()
    DbContext.Entry<TEntity>(TEntity)
    DbContext.Entry(object)
    DbContext.Add<TEntity>(TEntity)
    DbContext.AddAsync<TEntity>(TEntity, CancellationToken)
    DbContext.Attach<TEntity>(TEntity)
    DbContext.Update<TEntity>(TEntity)
    DbContext.Remove<TEntity>(TEntity)
    DbContext.Add(object)
    DbContext.AddAsync(object, CancellationToken)
    DbContext.Attach(object)
    DbContext.Update(object)
    DbContext.Remove(object)
    DbContext.AddRange(params object[])
    DbContext.AddRangeAsync(params object[])
    DbContext.AttachRange(params object[])
    DbContext.UpdateRange(params object[])
    DbContext.RemoveRange(params object[])
    DbContext.AddRange(IEnumerable<object>)
    DbContext.AddRangeAsync(IEnumerable<object>, CancellationToken)
    DbContext.AttachRange(IEnumerable<object>)
    DbContext.UpdateRange(IEnumerable<object>)
    DbContext.RemoveRange(IEnumerable<object>)
    DbContext.Find(Type, params object[])
    DbContext.FindAsync(Type, params object[])
    DbContext.FindAsync(Type, object[], CancellationToken)
    DbContext.Find<TEntity>(params object[])
    DbContext.FindAsync<TEntity>(params object[])
    DbContext.FindAsync<TEntity>(object[], CancellationToken)
    DbContext.FromExpression<TResult>(Expression<Func<IQueryable<TResult>>>)
    DbContext.Database
    DbContext.ChangeTracker
    DbContext.Model
    DbContext.ContextId
    DbContext.SavingChanges
    DbContext.SavedChanges
    DbContext.SaveChangesFailed
    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 Source

    WorkoutEntries

    Gets or sets the workout entries.

    public DbSet<WorkoutEntry> WorkoutEntries { get; set; }
    Property Type
    DbSet<WorkoutEntry>
    See Also
    DbContext
    | Improve this Doc View Source

    Workouts

    Gets or sets the workouts.

    public DbSet<Workout> Workouts { get; set; }
    Property Type
    DbSet<Workout>
    See Also
    DbContext

    Methods

    | Improve this Doc View Source

    OnConfiguring(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
    DbContext.OnConfiguring(DbContextOptionsBuilder)
    See Also
    DbContext
    | Improve this Doc View Source

    SaveChanges()

    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.

    Overrides
    DbContext.SaveChanges()
    See Also
    DbContext

    Implements

    IInfrastructure<T>
    IDbContextDependencies
    IDbSetCache
    IDbContextPoolable
    IResettableService
    IDisposable
    IAsyncDisposable

    See Also

    DbContext
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2021 by Wayne Venables