Update LiteDb, but KO bdd

This commit is contained in:
Sébastien André
2020-02-03 18:14:51 +01:00
parent 55ff52fd19
commit e19fc02a6f
17 changed files with 153 additions and 1071 deletions

View File

@@ -48,8 +48,8 @@ namespace skydiveLogs_api.Data
return result;
}
private readonly IDataProvider _dataProvider;
private readonly IDataProvider _dataProvider;
private readonly LiteCollection<Aircraft> _col;
private readonly ILiteCollection<Aircraft> _col;
}
}

View File

@@ -50,6 +50,6 @@ namespace skydiveLogs_api.Data
private readonly IDataProvider _dataProvider;
private readonly LiteCollection<DropZone> _col;
private readonly ILiteCollection<DropZone> _col;
}
}

View File

@@ -50,6 +50,6 @@ namespace skydiveLogs_api.Data
private readonly IDataProvider _dataProvider;
private readonly LiteCollection<Gear> _col;
private readonly ILiteCollection<Gear> _col;
}
}

View File

@@ -7,18 +7,18 @@ namespace skydiveLogs_api.Data.Interface
{
public interface IDataProvider
{
LiteCollection<T> GetCollection<T>();
ILiteCollection<T> GetCollection<T>();
void Close();
LiteCollection<Aircraft> CollOfAircraft { get; }
ILiteCollection<Aircraft> CollOfAircraft { get; }
LiteCollection<DropZone> CollOfDropZone { get; }
ILiteCollection<DropZone> CollOfDropZone { get; }
LiteCollection<Gear> CollOfGear { get; }
ILiteCollection<Gear> CollOfGear { get; }
LiteCollection<JumpType> CollOfJumpType { get; }
ILiteCollection<JumpType> CollOfJumpType { get; }
LiteCollection<Jump> CollOfJump { get; }
ILiteCollection<Jump> CollOfJump { get; }
}
}

View File

@@ -55,6 +55,6 @@ namespace skydiveLogs_api.Data
private readonly IDataProvider _dataProvider;
private readonly LiteCollection<Jump> _col;
private readonly ILiteCollection<Jump> _col;
}
}

View File

@@ -50,6 +50,6 @@ namespace skydiveLogs_api.Data
private readonly IDataProvider _dataProvider;
private readonly LiteCollection<JumpType> _col;
private readonly ILiteCollection<JumpType> _col;
}
}

View File

@@ -16,7 +16,7 @@ namespace skydiveLogs_api.Data
BsonMapper.Global.Entity<Jump>().DbRef(x => x.Gear, "Gear");
}
public LiteCollection<T> GetCollection<T>()
public ILiteCollection<T> GetCollection<T>()
{
return _db.GetCollection<T>();
}
@@ -28,14 +28,14 @@ namespace skydiveLogs_api.Data
private readonly LiteDatabase _db;
public LiteCollection<Aircraft> CollOfAircraft => _db.GetCollection<Aircraft>();
public ILiteCollection<Aircraft> CollOfAircraft => _db.GetCollection<Aircraft>();
public LiteCollection<DropZone> CollOfDropZone => _db.GetCollection<DropZone>();
public ILiteCollection<DropZone> CollOfDropZone => _db.GetCollection<DropZone>();
public LiteCollection<Gear> CollOfGear => _db.GetCollection<Gear>();
public ILiteCollection<Gear> CollOfGear => _db.GetCollection<Gear>();
public LiteCollection<JumpType> CollOfJumpType => _db.GetCollection<JumpType>();
public ILiteCollection<JumpType> CollOfJumpType => _db.GetCollection<JumpType>();
public LiteCollection<Jump> CollOfJump => _db.GetCollection<Jump>();
public ILiteCollection<Jump> CollOfJump => _db.GetCollection<Jump>();
}
}

View File

@@ -6,7 +6,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.0-beta" />
<PackageReference Include="LiteDB" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>