Auto clean code
This commit is contained in:
@@ -1,37 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using LiteDB;
|
||||
|
||||
using LiteDB;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainService.Repositories;
|
||||
using skydiveLogs_api.Infrastructure.Interfaces;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace skydiveLogs_api.Infrastructure
|
||||
{
|
||||
public class DropZoneRepository : IDropZoneRepository
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public DropZoneRepository(IDataProvider dataProvider)
|
||||
{
|
||||
_dataProvider = dataProvider;
|
||||
_col = _dataProvider.CollOfDropZone;
|
||||
}
|
||||
|
||||
public IEnumerable<DropZone> GetAll()
|
||||
{
|
||||
return _col.FindAll().ToList();
|
||||
}
|
||||
#endregion Public Constructors
|
||||
|
||||
public DropZone GetById(int id)
|
||||
{
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public bool Update(DropZone updatedDz)
|
||||
{
|
||||
return _col.Update(updatedDz);
|
||||
}
|
||||
#region Public Methods
|
||||
|
||||
public int Add(DropZone newDz)
|
||||
{
|
||||
@@ -50,8 +38,28 @@ namespace skydiveLogs_api.Infrastructure
|
||||
return result;
|
||||
}
|
||||
|
||||
private readonly IDataProvider _dataProvider;
|
||||
public IEnumerable<DropZone> GetAll()
|
||||
{
|
||||
return _col.FindAll().ToList();
|
||||
}
|
||||
|
||||
public DropZone GetById(int id)
|
||||
{
|
||||
return _col.FindById(new BsonValue(id));
|
||||
}
|
||||
|
||||
public bool Update(DropZone updatedDz)
|
||||
{
|
||||
return _col.Update(updatedDz);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private readonly ILiteCollection<DropZone> _col;
|
||||
private readonly IDataProvider _dataProvider;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user