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

Suggestions #8

Open
balintn22 opened this issue Jan 3, 2022 · 0 comments
Open

Suggestions #8

balintn22 opened this issue Jan 3, 2022 · 0 comments

Comments

@balintn22
Copy link

balintn22 commented Jan 3, 2022

Hi Ishrak,
I see it's fairly old code, but I found it relly helpful.
Some suggestions:

  • you might want to remove unused using statements
  • in HotelsGroupViewModel, you have a property and a backing variable (items and Items).
    In the constructor (lines 30-31) you initialise them both, one would be enough.
  • HotelViewModel is derived from ObservableRangeCollection
    This is a big no-no in programming in general, however, in this case it is a key part of the implementation, you might want to add a comment about it: ListView requires a collection of a collection of items (List<List>). The only way you can achieve this if HotelViewModel IS a collection of RoomViewModels, it can't be implemented as a type with a property holding the collection of those.
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

No branches or pull requests

1 participant