我有工作需要我创建一个自动化流程,我将
Get-Filehash -algorithm MD5 > c:\test\Axxx.txt
Get-Filehash -algorithm MD5 > c:\test\Bxxx.txt
我被所有的cmdts困住了..这太难了!但我仍在努力学习PS。
答案 0 :(得分:0)
这是实现目标的快捷方式。
public class ProductController : Controller
{
private readonly IProductRepository repository;
public int PageSize = 3;
public ProductController(IProductRepository repo)
{
repository = repo;
}
public ViewResult List(string category, int Page = 1)
{
ProductsListViewModel model = new ProductsListViewModel
{
Products= repository.Products
.Where(p => category == null || p.Category == category)
.OrderBy(p => p.ProductID)
.Skip((Page - 1) * PageSize)
.Take(PageSize),
pagingInfo = new PagingInfo
{
CurrentPage = Page,
ItemPerPage = PageSize,
TotalItems = repository.Products.Count()
},
CurrentCategory = category
};
return View(model);
}
}