User-1232255770 posted
namespace InternalTools.CloudAd.Shared
{
public class Account
{
[Required]
[DisplayName("First name")]
public string FirstName { get; set; }
[Required]
[DisplayName("Last name")]
public string LastName { get; set; }
//[NotMapped]
public string FullLDapName { get; set; }
[Required]
[DisplayName("Email address")]
public string EmailAddress { get; set; }
//[NotMapped]
public string Password { get; set; }
//public string Company { get; set; }
//[NotMapped]
public string UserPrincipalName { get; set; }
// public int CompanyID { get; set; }
//[NotMapped]
public string AdGroupSelected { get; set; }
//[NotMapped]
public string AdOrgUnitSelected { get; set; }
[Required]
[DisplayName("Course type")]
public string CourseType { get; set; }
}
}
razor page
@using InternalTools.CloudAd.Shared;
@page "/cloudad"
<EditForm Model="@Account" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />
<InputText id="FirstName" @bind-Value="Account.FirstName" />
<button type="submit">Create Account</button>
</EditForm>
@code {
private Account account = new Account();
private void HandleValidSubmit()
{
}
}
Model="@Account" , gives the following error
CS0119 C# 'Account' is a type, which is not valid in the given context
Any ideas ?