CORS, Theme, Better flow and dotnet tools - II
This commit is contained in:
@ -8,6 +8,6 @@
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Text.Json" Version="7.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="7.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -2,19 +2,20 @@ using System.Text.Json;
|
||||
|
||||
namespace Expose.MyIT.Shared.ViewModels;
|
||||
|
||||
// [JsonConstructor]
|
||||
public record ServiceShopOrder(string Id,
|
||||
string Name,
|
||||
string[] BookingNames,
|
||||
string Type,
|
||||
string State,
|
||||
string ItemNumber,
|
||||
DateTime CreatedDate,
|
||||
DateTime DecidedDate,
|
||||
string Recipient,
|
||||
string Requestor)
|
||||
string Name,
|
||||
string[] BookingNames,
|
||||
string Type,
|
||||
string State,
|
||||
string ItemNumber,
|
||||
DateTime CreatedDate,
|
||||
DateTime DecidedDate,
|
||||
string Recipient,
|
||||
string Requestor)
|
||||
{
|
||||
|
||||
public ServiceShopOrder(Models.Order order) :
|
||||
internal ServiceShopOrder(Models.Order order) :
|
||||
this(order.Id,
|
||||
order.Name,
|
||||
order.Bookings is null || !order.Bookings.Any() ? Array.Empty<string>() : order.Bookings.Select(l => l.Name).ToArray(),
|
||||
|
@ -2,19 +2,20 @@ using System.Text.Json;
|
||||
|
||||
namespace Expose.MyIT.Shared.ViewModels;
|
||||
|
||||
// [JsonConstructor]
|
||||
public record SsaOrder(string Id,
|
||||
string Name,
|
||||
string[] BookingNames,
|
||||
string Type,
|
||||
string State,
|
||||
string ItemNumber,
|
||||
DateTime CreatedDate,
|
||||
DateTime DecidedDate,
|
||||
string Recipient,
|
||||
string Requestor)
|
||||
string Name,
|
||||
string[] BookingNames,
|
||||
string Type,
|
||||
string State,
|
||||
string ItemNumber,
|
||||
DateTime CreatedDate,
|
||||
DateTime DecidedDate,
|
||||
string Recipient,
|
||||
string Requestor)
|
||||
{
|
||||
|
||||
public SsaOrder(Models.Order order) :
|
||||
internal SsaOrder(Models.Order order) :
|
||||
this(order.Id,
|
||||
order.Name,
|
||||
order.Bookings is null || !order.Bookings.Any() ? Array.Empty<string>() : order.Bookings.Select(l => l.Name).ToArray(),
|
||||
|
@ -6,9 +6,22 @@ namespace Expose.MyIT.Shared.ViewModels;
|
||||
public record WeatherForecast
|
||||
{
|
||||
|
||||
public DateOnly Date { init; get; }
|
||||
|
||||
public int TemperatureC { init; get; }
|
||||
|
||||
public string? Summary { init; get; }
|
||||
|
||||
public int TemperatureF { init; get; }
|
||||
|
||||
[JsonConstructor]
|
||||
public WeatherForecast(DateOnly Date, int TemperatureC, string? Summary, int TemperatureF)
|
||||
{ }
|
||||
public WeatherForecast(DateOnly date, int temperatureC, string? summary, int temperatureF)
|
||||
{
|
||||
Date = date;
|
||||
TemperatureC = temperatureC;
|
||||
Summary = summary;
|
||||
TemperatureF = temperatureF;
|
||||
}
|
||||
|
||||
public WeatherForecast(Models.WeatherForecast weatherForecast) :
|
||||
this(weatherForecast.Date,
|
||||
|
Reference in New Issue
Block a user