There is a model in my project
using System;
namespace Argussite.SupplierServices.ViewModels
{
public class UsersPage
{
public Guid SupplierId { get; set; }
public string SupplierFullName { get; set; }
public bool ActionsAllowed { get; set; }
}
}
I use my model in controller and set properties
public ActionResult Index(Guid id)
{
var supplierOfUser = Context.Suppliers.AsNoTracking()
//.Include(e => e.Supplier)
.FirstOrDefault(e => e.Id == id);
string SupplierId = id.ToString();
string SupplierFullName = supplierOfUser.FullName.ToString();
bool ActionsAllowed = supplierOfUser.Active;
return View();
}
and then I need to use that in view, but I don't know how to get my properties in the view?