Tag: 命令查询分离

更改基本MVVM的当前实现以遵守SOLID模式

我一直在编写所有MVVM应用程序,其基本设计模式通常在网上提供的MVVM示例中提到。 我所遵循的模式描述如下: 模型 本节包括DTO类及其属性和Interfaces IDataService等: public class Employee { public string EmployeeName { get; set; } public string EmployeeDesignation { get; set; } public string EmployeeID { get; set; } } public interface IDataService { public Task GetEmployeeLst(); } 代理 该层包含实现IDataservice的Dataservice调用,如: public class DataService : IDataService { public async Task GetEmployeeLst() { // Logic to […]