Skip to content

Conversation

@BrozDa
Copy link

@BrozDa BrozDa commented May 29, 2025

First pull request iteration
Readme to be added after initial codacy check

Daniel and others added 30 commits May 11, 2025 17:45
This commit is just test commit without -m flag. Purpose was to practice
commits without the flag and see how it looks in the editor.
Exercise service class used Exercise model directly. Refactored service
and Service interface to use DTO and addded extention method for
RepositoryResult used to map repository result accordingly
Ui service used Exercise model for all its operations. Uses only
ExerciseDto model now
View all method tested - working now
All functionality rewritten using DTOs. All CRUD ops tested and working.
Test implementation of get all method for dapper repository.
First time working with dapper with navigational properties so wanted
to test it.
Working implementation done
Implemented and tested autoseed functionality for dapper repo.
All CRUD operations within dapper repository implemented and working
Added new 2 interfaces IWeightExerciseService, ICardioExerciseService.
Both of them are implemented by service class and properly registered
in DI container
Cleared migration tree to contain only the production one.
Project is now completed using 2 separate services to access
2 tables - one using EF core, one using Dapper.
User is presented with choice for table which will be used.
Came up with solution to have mapping done in Service class, in
ExecuteSafeAsync method. This allowed to get rid of
RepositoryResultExtensions class.

Previous implementation needed to re-wrap RepositoryResult from
Model to DTO. This is history now.
Code is now simpler, more readable and more efficient.
Documentation added for rest of the code:
ExerciseController
ExerciseDto
IExerciseRepository
ExerciseService
IUserInputOutput
UserInputOutput
BrozDa added 4 commits May 29, 2025 11:05
List of issues and applied fixes:
1.Migration name was in lowercase - removed and re-added the migration
with upper case name
2. Unused param array in Program.cs Main method - deleted the parameter
3-4. Empty statements in UserInputOutput GetExercise method - removed
redundant semicolons after start and end time date initialization
statements
5. Unused variable in ExerciseController ProcessCreate method -
removed unused variable
Removed unused variable in ExerciseController ProcessUpdate method
Copy link

@chrisjamiecarter chrisjamiecarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @BrozDa 👋,

Excellent work on your Exercise Tracker project submission 🎉!

I have performed a peer review. Review/ignore any comments as you wish.


🟢 Requirements

⭐ You have fulfilled all of the project requirements!


I will go ahead and mark as approved, keep up the excellent work on the next projects! 😊

Best regards,
@chrisjamiecarter 👍

using Microsoft.Extensions.Configuration;
using System.Text.Json;

namespace ExerciseTracker.Brozda.Data

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Namespaces
As per the academy's code-conventions - Use the newest namespaces.
Use file-scoped namespaces to save an indentation level:

// Block-Scoped Namespace
namespace YourNamespace
{
    // Code here...
}

✔️

// File-Scoped Namespace
namespace YourNamespace;

// Code here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants