コード例 #1
0
 async Task ICityNameService.AddAsync(CityName cityName)
 {
     string sql   = "insert into dbo.cityname values(@id,@name)";
     var    paras = new Dictionary <string, object>()
     {
         { "id", cityName.Id },
         { "name", cityName.CName }
     };
     await _baseDao.ExecuteAsync(sql, paras);
 }
コード例 #2
0
 async Task ICityNameService.UpdateAsync(CityName cityName)
 {
     string sql   = "update dbo.cityname set CName=@name where id=@id";
     var    paras = new Dictionary <string, object>()
     {
         { "id", cityName.Id },
         { "name", cityName.CName }
     };
     await _baseDao.ExecuteAsync(sql, paras);
 }