diff --git a/Back/skydiveLogs-api.Infrastructure/StatsByDzRepository.cs b/Back/skydiveLogs-api.Infrastructure/StatsByDzRepository.cs
index c64b5af..450b379 100644
--- a/Back/skydiveLogs-api.Infrastructure/StatsByDzRepository.cs
+++ b/Back/skydiveLogs-api.Infrastructure/StatsByDzRepository.cs
@@ -10,6 +10,10 @@ namespace skydiveLogs_api.Infrastructure
{
#region Public Constructors
+ ///
+ /// Initializes a new instance of the class
+ ///
+ /// The data provider to use for data access
public StatsByDzRepository(IDataProvider dataProvider)
{
_dataProvider = dataProvider;
@@ -20,6 +24,11 @@ namespace skydiveLogs_api.Infrastructure
#region Public Methods
+ ///
+ /// Adds a new collection of stats by drop zone to the database
+ ///
+ /// The collection of stats by drop zone instances to add
+ /// The number of rows affected
public int Add(IEnumerable newStats)
{
int result = 0;
@@ -40,6 +49,11 @@ namespace skydiveLogs_api.Infrastructure
return result;
}
+ ///
+ /// Retrieves all stats by drop zone for a specific user
+ ///
+ /// The user whose stats by drop zone to retrieve
+ /// A collection of stats by drop zone instances belonging to the user
public IEnumerable GetAll(User user)
{
return _col.Include(x => x.User)
@@ -48,6 +62,12 @@ namespace skydiveLogs_api.Infrastructure
.ToList();
}
+ ///
+ /// Updates existing stats by drop zone in the database
+ ///
+ /// The stats by drop zone instances to update
+ /// The user whose stats to update
+ /// True if the update was successful, false otherwise
public bool Update(IEnumerable updatedStats, User user)
{
Delete(user);
@@ -56,6 +76,11 @@ namespace skydiveLogs_api.Infrastructure
return tmp != 0;
}
+ ///
+ /// Deletes all stats by drop zone for a specific user
+ ///
+ /// The user whose stats by drop zone to delete
+ /// True if the delete was successful, false otherwise
public bool Delete(User user)
{
var tmp = _col.DeleteMany(s => s.User.Id == user.Id);
@@ -71,4 +96,4 @@ namespace skydiveLogs_api.Infrastructure
#endregion Private Fields
}
-}
\ No newline at end of file
+}
diff --git a/Back/skydiveLogs-api.Infrastructure/StatsByGearRepository.cs b/Back/skydiveLogs-api.Infrastructure/StatsByGearRepository.cs
index ba2fd95..43293b6 100644
--- a/Back/skydiveLogs-api.Infrastructure/StatsByGearRepository.cs
+++ b/Back/skydiveLogs-api.Infrastructure/StatsByGearRepository.cs
@@ -10,6 +10,10 @@ namespace skydiveLogs_api.Infrastructure
{
#region Public Constructors
+ ///
+ /// Initializes a new instance of the class
+ ///
+ /// The data provider to use for data access
public StatsByGearRepository(IDataProvider dataProvider)
{
_dataProvider = dataProvider;
@@ -20,6 +24,11 @@ namespace skydiveLogs_api.Infrastructure
#region Public Methods
+ ///
+ /// Adds a new collection of stats by gear to the database
+ ///
+ /// The collection of stats by gear instances to add
+ /// The number of rows affected
public int Add(IEnumerable newStats)
{
int result = 0;
@@ -40,6 +49,11 @@ namespace skydiveLogs_api.Infrastructure
return result;
}
+ ///
+ /// Retrieves all stats by gear for a specific user
+ ///
+ /// The user whose stats by gear to retrieve
+ /// A collection of stats by gear instances belonging to the user
public IEnumerable GetAll(User user)
{
return _col.Include(x => x.User)
@@ -48,6 +62,12 @@ namespace skydiveLogs_api.Infrastructure
.ToList();
}
+ ///
+ /// Updates existing stats by gear in the database
+ ///
+ /// The stats by gear instances to update
+ /// The user whose stats to update
+ /// True if the update was successful, false otherwise
public bool Update(IEnumerable updatedStats, User user)
{
Delete(user);
@@ -56,6 +76,11 @@ namespace skydiveLogs_api.Infrastructure
return tmp != 0;
}
+ ///
+ /// Deletes all stats by gear for a specific user
+ ///
+ /// The user whose stats by gear to delete
+ /// True if the delete was successful, false otherwise
public bool Delete(User user)
{
var tmp = _col.DeleteMany(s => s.User.Id == user.Id);
@@ -71,4 +96,4 @@ namespace skydiveLogs_api.Infrastructure
#endregion Private Fields
}
-}
\ No newline at end of file
+}