public List<SuppliersView> GetAllSuppliers()
 {
     using (var supplier = new SuppliersRepository())
     {
         return supplier.GetAll().Select(x => new SuppliersView
         {
             SupplierId = x.SupplierId,
             EmailAddress = x.EmailAddress,
             PhysicalAddress = x.PhysicalAddress,
             ShortCode = x.ShortCode,
             Status = x.Status,
             SupplierCellNo = x.SupplierCellNo,
             SupplierLastName = x.SupplierLastName,
             SupplierName = x.SupplierName,
             SupplierTelNo = x.SupplierCellNo,
             UserId = x.UserId
         }).ToList();
     }
 }
 public List<SuppliersView> GetAllSuppliersApproved()
 {
     using (var supplier = new SuppliersRepository())
     {
         List<Suppliers> returnList = supplier.GetAll().Where(x => x.Status == "Approved").ToList();
         return returnList.Select(x => new SuppliersView
         {
             SupplierId = x.SupplierId,
             EmailAddress = x.EmailAddress,
             PhysicalAddress = x.PhysicalAddress,
             ShortCode = x.ShortCode,
             Status = x.Status,
             SupplierCellNo = x.SupplierCellNo,
             SupplierLastName = x.SupplierLastName,
             SupplierName = x.SupplierName,
             SupplierTelNo = x.SupplierCellNo,
             UserId = x.UserId
         }).ToList();
     }
 }