Subbz
Subbz
CC#
Created by Temptica on 11/26/2023 in #help
✅ Binding a RelayCommand in a CollectionView DataTemplate with an other object as DataType
np
17 replies
CC#
Created by Temptica on 11/26/2023 in #help
✅ Binding a RelayCommand in a CollectionView DataTemplate with an other object as DataType
Yeah so changing the Path from Path=SetDone to Path=SetDoneCommand should work
17 replies
CC#
Created by Levis on 11/27/2023 in #help
ASP.NET Core 8 Web API, can't use additional fields with Identity registration
The MapIdentityApi<User> extension method only adds email and password when registering, as it takes a RegisterRequest containing only those two properties. You'd have to write you own from another controller, and accept whatever you need. You can F12 over the MapIdentityApi<User> to see see the register method.
9 replies
CC#
Created by Temptica on 11/26/2023 in #help
✅ Binding a RelayCommand in a CollectionView DataTemplate with an other object as DataType
Actually I looked at it again just after posting that, and it will work with [RelayCommand], I forgot you have to bind it in XAML to SetDoneCommand and RemoveCommand respectively as that's what the commands are called when code is generated by the toolkit. If you change those in your XAML all should work.
17 replies
CC#
Created by Temptica on 11/26/2023 in #help
✅ Binding a RelayCommand in a CollectionView DataTemplate with an other object as DataType
Either way, using [RelayCommand] from the toolkit wouldn't execute the command, using your binding code, but manually declaring the command did:
public IRelayCommand SetDone => new RelayCommand<TodoViewModel>(ExecuteSetDone);
public void ExecuteSetDone(TodoViewModel model)
{
Application.Current.MainPage.DisplayAlert(model.Name, model.Name, "Cancel");
}
public IRelayCommand SetDone => new RelayCommand<TodoViewModel>(ExecuteSetDone);
public void ExecuteSetDone(TodoViewModel model)
{
Application.Current.MainPage.DisplayAlert(model.Name, model.Name, "Cancel");
}
17 replies
CC#
Created by Temptica on 11/26/2023 in #help
✅ Binding a RelayCommand in a CollectionView DataTemplate with an other object as DataType
I just tested it, and it wouldn't work like I've done it in WPF. Are you using the MVVMCommunity Tookit?
17 replies
CC#
Created by Temptica on 11/26/2023 in #help
✅ Binding a RelayCommand in a CollectionView DataTemplate with an other object as DataType
Does setting the AncestorType to CollectionView and the Path to DataContext.SetDone work? I’ve used that in WPF but not sure on Maui
17 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
I went back and looked, and for whatever reason I forgot to include an employee nav property as part of the shift entity, added it, migrated now I can load everything from the single endpoint
16 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
Good to know I was thinking about it the right way, thanks!
16 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
so it's 2 endpoints instead of 1 + x
16 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
as the list of employees isn't that long for what I'm doing (15 at most)
16 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
yeah that was my other way, have my frontend call and get a list of employees with ID, and use that when parsing the shifts
16 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
yeah that was my thinking. Right now I pull a list of shift in a given date range. Then groupby on that list to nest it to each employeeID. It made sense to do it that way as the client would have an easier time to parse. When I was grouping, I tried to include the employee name but it was giving unexpected entries in the json response
16 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
I'm using EF core with SQLite atm
16 replies
CC#
Created by Subbz on 2/14/2023 in #help
Best practice for return data from API
Basically yeah, it seems a bit over the top to call for the leader name for each set of shifts
16 replies