我使用resharper工作,当我清理代码时,我得到了这个布局:
mock.Setup(m => m.Products).Returns(new List<Product>{new Product{Name = "Football", Price = 25}, new Product{Name = "Surf board", Price = 179}, new Product{Name = "Running Shoes", Price = 95}}.AsQueryable());
Run Code Online (Sandbox Code Playgroud)
我宁愿:
mock.Setup(m => m.Products).Returns(new List<Product>{
new Product{Name = "Football", Price = 25},
new Product{Name = "Surf board", Price = 179},
new Product{Name = "Running Shoes", Price = 95}
}.AsQueryable());
Run Code Online (Sandbox Code Playgroud)
这可能吗?