dotnet watch run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git subtree push --prefix exercise origin gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In the form you can multiple of these: | |
<MTextField Text=@Text | |
IsAutofocus=@IsAutofocus | |
IsMultiline=@IsMultiline | |
Lines=@Lines | |
Value=@Value | |
Placeholder=@Placeholder | |
Suffix=@Suffix | |
OnChange=@OnChange | |
InputType=@InputType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.post('/addRatings/:evaluationid', function (req, res) { | |
const ids = req.body.map(x => x.competenceID); | |
const incomingRatings = req.body; | |
Rating.findAll({ | |
where: { | |
competenceID: [ids] | |
} | |
}).then(ratings => { | |
incomingRatings.forEach(r => { | |
let foundRating = ratings.find(x => x.competenceID == r.competenceID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Travel | |
{ | |
public IList<Expense> Expenses { get; set; } = new List<Expense>(); | |
} | |
public class Cost | |
{ | |
public decimal Amount { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SystemProvider Theme="new ThemeProvider(ThemeType.Fast)" use-defaults> | |
<Router AppAssembly="@typeof(Program).Assembly"> | |
<Found Context="routeData"> | |
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | |
</Found> | |
<NotFound> | |
<LayoutView Layout="@typeof(MainLayout)"> | |
<p>Sorry, there is nothing at this address.</p> | |
</LayoutView> | |
</NotFound> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using System.ComponentModel.DataAnnotations | |
<EditForm Model="model" OnValidSubmit="Submit"> | |
<DataAnnotationsValidator /> | |
<ValidationSummary /> | |
<p> | |
<TextField @bind-Value="model.Firstname">Firstname*</TextField> | |
</p> | |
<p> | |
<TextField @bind-Value="model.Lastname">Lastname*</TextField> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Route("api/test")] | |
[HttpGet] | |
public async Task<IActionResult> Test() { | |
var contentType = "multipart/x-mixed-replace;boundary=myboundary"; | |
Stream stream = await client.Value.GetStreamAsync(WebCamUrl); | |
var result = new FileStreamResult(stream, contentType) { | |
EnableRangeProcessing = true | |
}; | |
return result; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet] | |
public async Task<IActionResult> Get() | |
{ | |
BlobContainerClient container = new BlobContainerClient(_connectionString, "test"); | |
var blockBlob = container.GetBlobClient("test.mp4"); | |
Stream fileStream = new MemoryStream(); | |
var contentType = "multipart/x-mixed-replace;boundary=myboundary"; | |
await blockBlob.DownloadToAsync(fileStream); | |
var result = new FileStreamResult(fileStream, contentType) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Address : ValueObject | |
{ | |
public string Street { get; init; } | |
public string ZipCode { get; init; } | |
public string Municipality { get; init; } | |
public string AddressLine1 => $"{Street}"; | |
public string AddressLine2 => $"{Country.Code}-{ZipCode} {Municipality}"; | |
/// <summary> |
OlderNewer