Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactor ContentRow into a record in place of a class #22

Closed
wants to merge 1 commit into from

Conversation

andresmoschini
Copy link
Member

Very minor change to keep the code style aligned with #21.

It will force us to define all properties and make the object read-only. Record types are really convenient for this class of DTOs.

@@ -24,7 +24,7 @@ public async Task<ContentModel> GetCampaignModel(string accountName, int campaig
JOIN [User] u ON u.IdUser = ca.IdUser
WHERE co.IdCampaign = @campaignId AND u.Email = @accountName AND co.EditorType = 5";
var result = await connection.QueryFirstOrDefaultAsync<ContentRow>(databaseQuery, new { campaignId, accountName });
Copy link
Member Author

Choose a reason for hiding this comment

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

Ooops, I am not sure if it will work: DapperLib/Dapper#1571

@maurocardinali let me know when you be testing your changes and we could test it too.

@andresmoschini
Copy link
Member Author

We test it with @maurocardinali and effectively it does not works fine with Dapper (see DapperLib/Dapper#1571)

Closing this PR.

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.

1 participant