Skip to content

Conversation

@staszkiet
Copy link
Member

No description provided.

_tickApiDbContext = tickApiDbContext;
}

public async Task<Result<ICollection<Category>>> GetCategoriesAsync()
Copy link
Member

Choose a reason for hiding this comment

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

If there is no possibility of an error we don't need to use Result<...>

Copy link
Member Author

Choose a reason for hiding this comment

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

Isn't it better to stick to the convention?

Copy link
Member

Choose a reason for hiding this comment

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

I mean, the point of this class is to help us handle errors (we use it instead of exceptions). If we have no errors in the function using Result just makes things less readable imo.

@staszkiet staszkiet force-pushed the feat/GetCategories branch from 113350c to afc34c7 Compare April 3, 2025 15:22
Copy link
Member

@kTrzcinskii kTrzcinskii left a comment

Choose a reason for hiding this comment

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

Great work!

@kubapoke kubapoke merged commit e432cce into develop Apr 5, 2025
1 check passed
@kTrzcinskii kTrzcinskii deleted the feat/GetCategories branch April 5, 2025 21:33
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.

4 participants