-
@@ -52,6 +53,5 @@
@code{
-
private NavMenu NavBar { get; set; }
}
\ No newline at end of file
diff --git a/Clients/Core/NotatnikMechanika.Core.csproj b/Clients/Core/NotatnikMechanika.Core.csproj
index 2af8107..d5ec836 100644
--- a/Clients/Core/NotatnikMechanika.Core.csproj
+++ b/Clients/Core/NotatnikMechanika.Core.csproj
@@ -5,7 +5,7 @@
true
-
+
all
diff --git a/Clients/Core/PageModels/ContentPageModels/CustomerPageModel.cs b/Clients/Core/PageModels/ContentPageModels/CustomerPageModel.cs
index 4c298fb..2329c86 100644
--- a/Clients/Core/PageModels/ContentPageModels/CustomerPageModel.cs
+++ b/Clients/Core/PageModels/ContentPageModels/CustomerPageModel.cs
@@ -32,7 +32,7 @@ public CustomerPageModel(IHttpRequestService httpRequestService, IMvNavigationSe
_messageDialogService = messageDialogService;
CustomerModel = new CustomerModel();
GoBackCommand = new AsyncCommand(navigationService.NavigateToAsync);
- AddCarCommand = new AsyncCommand(() => navigationService.NavigateToAsync(CustomerModel.Id));
+ AddCarCommand = new AsyncCommand(() => navigationService.NavigateToAsync(CustomerModel.Id ?? 0));
RemoveCarCommand = new AsyncCommand(RemoveCarAction);
Cars = new ObservableCollection();
}
@@ -51,7 +51,7 @@ public override async Task Initialize()
IsLoading = true;
CustomerModel.Id = Parameter ?? 0;
- var customer = await _httpRequestService.ById(CustomerModel.Id, "Błąd ładowania klienta");
+ var customer = await _httpRequestService.ById(CustomerModel.Id.Value, "Błąd ładowania klienta");
if (customer != null)
{
CustomerModel = customer;
diff --git a/Clients/Core/Services/HttpRequestService.cs b/Clients/Core/Services/HttpRequestService.cs
index a6eca67..092b485 100644
--- a/Clients/Core/Services/HttpRequestService.cs
+++ b/Clients/Core/Services/HttpRequestService.cs
@@ -21,43 +21,43 @@ public HttpRequestService(HttpClient client, IMessageDialogService messageDialog
_messageDialogService = messageDialogService;
}
- public async Task SendGet(string path, string onErrorTitle) where TContent : class
+ public async Task SendGet(string? path, string? onErrorTitle) where TContent : class
{
return await HandleResponse(await _client.GetAsync(path), onErrorTitle);
}
- public async Task SendPost(object model, string path, string onErrorTitle)
+ public async Task SendPost(object? model, string? path, string? onErrorTitle)
{
string myContent = JsonConvert.SerializeObject(model);
var content = new StringContent(myContent, Encoding.UTF8, "application/json");
return await HandleResponse(await _client.PostAsync(path, content), onErrorTitle);
}
- public async Task SendPost(object model, string path, string onErrorTitle = null) where TContent : class
+ public async Task SendPost(object? model, string? path, string? onErrorTitle = null) where TContent : class
{
string myContent = JsonConvert.SerializeObject(model);
var content = new StringContent(myContent, Encoding.UTF8, "application/json");
return await HandleResponse(await _client.PostAsync(path, content), onErrorTitle);
}
- public async Task SendUpdate(object model, string path, string onErrorTitle)
+ public async Task SendUpdate(object? model, string? path, string? onErrorTitle)
{
string myContent = JsonConvert.SerializeObject(model);
var content = new StringContent(myContent, Encoding.UTF8, "application/json");
return await HandleResponse(await _client.PutAsync(path, content), onErrorTitle);
}
- public async Task SendUpdate(string path, string onErrorTitle)
+ public async Task SendUpdate(string? path, string? onErrorTitle)
{
return await HandleResponse(await _client.PutAsync(path, null), onErrorTitle);
}
- public async Task SendDelete(string path, string onErrorTitle)
+ public async Task SendDelete(string? path, string? onErrorTitle)
{
return await HandleResponse(await _client.DeleteAsync(path), onErrorTitle);
}
- private async Task HandleResponse(HttpResponseMessage response, string onErrorTitle) where TContent : class
+ private async Task? HandleResponse(HttpResponseMessage? response, string? onErrorTitle) where TContent : class
{
string responseString = await response.Content.ReadAsStringAsync();
diff --git a/Clients/Forms.Android/NotatnikMechanika.Forms.Android.csproj b/Clients/Forms.Android/NotatnikMechanika.Forms.Android.csproj
index 495b3c6..0e63b60 100644
--- a/Clients/Forms.Android/NotatnikMechanika.Forms.Android.csproj
+++ b/Clients/Forms.Android/NotatnikMechanika.Forms.Android.csproj
@@ -152,12 +152,6 @@
-
-
- {5ffed678-5e44-4bfb-9b4b-4da84e156864}
- NotatnikMechanika.Forms
-
-
diff --git a/Clients/Forms/NotatnikMechanika.Forms.csproj b/Clients/Forms/NotatnikMechanika.Forms.csproj
index a9ce439..171b744 100644
--- a/Clients/Forms/NotatnikMechanika.Forms.csproj
+++ b/Clients/Forms/NotatnikMechanika.Forms.csproj
@@ -6,11 +6,11 @@
-
-
-
-
-
+
+
+
+
+
true
diff --git a/Clients/WPF/NotatnikMechanika.WPF.csproj b/Clients/WPF/NotatnikMechanika.WPF.csproj
index ee4e139..b555545 100644
--- a/Clients/WPF/NotatnikMechanika.WPF.csproj
+++ b/Clients/WPF/NotatnikMechanika.WPF.csproj
@@ -2,7 +2,7 @@
WinExe
- net5.0-windows
+ net6.0-windows
latest
true
false
@@ -15,7 +15,7 @@
-
+
diff --git a/MVVMPackage/Blazor/MVVMPackage.Blazor.csproj b/MVVMPackage/Blazor/MVVMPackage.Blazor.csproj
index 695eed4..c01d218 100644
--- a/MVVMPackage/Blazor/MVVMPackage.Blazor.csproj
+++ b/MVVMPackage/Blazor/MVVMPackage.Blazor.csproj
@@ -1,16 +1,17 @@
- net5.0
+ net6.0
-
-
-
-
-
-
+
+
+
+
+
+
+
all
diff --git a/MVVMPackage/Core/Commands/AsyncCommand.cs b/MVVMPackage/Core/Commands/AsyncCommand.cs
index 276f533..2e33eb1 100644
--- a/MVVMPackage/Core/Commands/AsyncCommand.cs
+++ b/MVVMPackage/Core/Commands/AsyncCommand.cs
@@ -10,8 +10,8 @@ namespace MvvmPackage.Core.Commands
public class AsyncCommand : IAsyncCommand
{
private readonly Func _execute;
- private readonly Func