ASP.NET CORE创建两个model
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AspNetCore31.PracticalDemo.Models
{
public class CurrentUser
{
public int Id { get; set; }
public string Name { get; set; }
public string Account { get; set; }
public string Password { get; set; }
public string Email { get; set; }
public string Role { get; set; }
public DateTime LoginTime { get; set; }
}
}
using System;
namespace AspNetCore31.PracticalDemo.Models
{
public class ErrorViewModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace AspNetCore31.PracticalDemo.Models
{
public class CurrentUser
{
public int Id { get; set; }
public string Name { get; set; }
public string Account { get; set; }
public string Password { get; set; }
public string Email { get; set; }
public string Role { get; set; }
public DateTime LoginTime { get; set; }
}
}
using System;
namespace AspNetCore31.PracticalDemo.Models
{
public class ErrorViewModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}