/// <summary>
    ///     Async method that update a specific data object.
    /// </summary>
    /// <param name="model">The object data model to update.</param>
    /// <returns>Returns number of state entries written to the database.</returns>
    public async Task <TModel> UpdateAsync(TModel model)
    {
        //this.context.Entry(await this.modelSet.FirstOrDefaultAsync(x => x.Id == model.Id)).CurrentValues.SetValues(model);
        using (var db = new ZorkManagerDbContext())
        {
            context.Entry(model).CurrentValues.SetValues(model);
            context.SaveChanges();
            return(model);
        }

        /*this.modelSet.Update(model);
         * await this.context.SaveChangesAsync().ConfigureAwait(false); //Problem Dispose context
         * return model;*/
    }
 public ZorkAccessLayer(ZorkManagerDbContext context)
     : base(context)
 {
 }
 public ObjectTypeAccessLayer(ZorkManagerDbContext context)
     : base(context)
 {
 }
 public Seeder(ZorkManagerDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="BaseAccessLayer{TModel}" /> class.
 /// </summary>
 /// <param name="context">The context.</param>
 protected BaseAccessLayer(ZorkManagerDbContext context)
 {
     this.context  = context;
     this.modelSet = this.context.Set <TModel>();
 }
 public MonsterAccessLayer(ZorkManagerDbContext context)
     : base(context)
 {
 }