Edits Global/GlobalEntity.cs and adds a test Create
This commit is contained in:
38
WatchLog/Components/Pages/GlobalEntities.razor
Normal file
38
WatchLog/Components/Pages/GlobalEntities.razor
Normal file
@@ -0,0 +1,38 @@
|
||||
@rendermode InteractiveServer
|
||||
@page "/"
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using WatchLog.Data
|
||||
@inject IDbContextFactory<WatchLogDataContext> WatchLogDataContextFactory;
|
||||
<PageTitle>GlobalEntities</PageTitle>
|
||||
|
||||
@if (ShowCreate)
|
||||
{
|
||||
<h3>Add a New GlobalEntity</h3>
|
||||
<div class="row">
|
||||
<label for="Title" class="col-4 col-form-label">Name</label>
|
||||
<div class="col-8">
|
||||
<input id="Title" name="Title" type="text" class="form-control" @bind="@NewGlobalEntity.Title" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="Password" class="col-4 col-form-label">Password</label>
|
||||
<div class="col-8">
|
||||
<input id="Password" name="Password" type="text" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="offset-4 col-8">
|
||||
<button name="submit" type="submit" class="btn btn-primary" @onclick="CreateNewGlobalEntity">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="form-group row">
|
||||
<div class="offset-4 col-8">
|
||||
<button name="submit" type="submit" class="btn btn-primary" @onclick="ShowCreateForm">Add a new Global Entity</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>SHOW THE LIST</p>
|
||||
}
|
||||
Reference in New Issue
Block a user