public AddCollection ( CarCollectionModel model ) : int | ||
model | CarCollectionModel | |
return | int |
public int AddCollection(CarCollectionModel model)
{
const string sql = @"INSERT INTO car_collection
(innerid, custid, carid, remark, createdtime)
VALUES
(@innerid, @custid, @carid, @remark, @createdtime);";
try
{
Helper.Execute(sql, model);
return 1;
}
catch (Exception ex)
{
LoggerFactories.CreateLogger().Write("添加收藏异常:", TraceEventType.Error, ex);
return 0;
}
}