コード例 #1
0
        public List <ApiCustomerModel> GetList()
        {
            List <ApiCustomerModel> customerList = new List <ApiCustomerModel>();

            ApiCustomerModel customer1 = new ApiCustomerModel
            {
                ID          = 1,
                Name        = "Abc",
                Address     = "Colombo",
                Tel         = "094",
                Creditlimit = 2000
            };

            ApiCustomerModel customer2 = new ApiCustomerModel
            {
                ID          = 2,
                Name        = "Bcd",
                Address     = "Panadura",
                Tel         = "094",
                Creditlimit = 2500
            };

            customerList.Add(customer1);
            customerList.Add(customer2);

            return(customerList);
        }
コード例 #2
0
        public ApiCustomerModel Get(int id)
        {
            ApiCustomerModel customer = new ApiCustomerModel {
                ID   = 1,
                Name = "Abc", Address = "Colombo",
                Tel  = "094", Creditlimit = 2000
            };

            return(customer);
        }
コード例 #3
0
 public bool AddCustomer(ApiCustomerModel newCustomer)
 {
     return(true);
 }