private static void AddCustomer() { Console.WriteLine("添加员工,请依次输入客户相关信息!"); Customer entity = GetCustomerByConsole(); if (CustomerMgr.Add(entity)) { Console.WriteLine("添加成功!"); ShowCustomerList(); } else { Console.WriteLine("未添加任何信息!"); } }
public void Add([FromBody] Customer customer) { _customerMgr.Add(customer); }