Add comments by AI

This commit is contained in:
2026-04-10 19:50:11 +02:00
parent d2869cf4bb
commit 86e50c35ab
8 changed files with 160 additions and 12 deletions
@@ -21,27 +21,49 @@ namespace skydiveLogs_api.DomainBusiness
#region Public Methods
/// <summary>
/// Adds a new image to the system.
/// </summary>
/// <param name="newImage">The UserImage entity containing the new image data.</param>
public void AddNewImage(UserImage newImage)
{
newImage.User = _identityService.ConnectedUser;
_imageRepository.Add(newImage);
}
/// <summary>
/// Deletes an image by its ID.
/// </summary>
/// <param name="id">The image ID to delete.</param>
public void DeleteImageById(int id)
{
throw new NotImplementedException();
}
/// <summary>
/// Retrieves all images.
/// </summary>
/// <returns>A collection of UserImage entities containing all images.</returns>
public IEnumerable<UserImage> GetAllImages()
{
return _imageRepository.GetAll(_identityService.ConnectedUser);
}
/// <summary>
/// Retrieves an image by its ID.
/// </summary>
/// <param name="id">The image ID to retrieve.</param>
/// <returns>A UserImage entity containing the image details.</returns>
public UserImage GetImageById(int id)
{
return _imageRepository.GetById(id);
}
/// <summary>
/// Updates an existing image.
/// </summary>
/// <param name="id">The image ID to update.</param>
/// <param name="Image">UserImage entity containing the updated image data.</param>
public void UpdateImage(int id, UserImage Image)
{
throw new NotImplementedException();
@@ -56,4 +78,4 @@ namespace skydiveLogs_api.DomainBusiness
#endregion Private Fields
}
}
}