CCN.Modules.Car.DataAccess.CarDataAccess.AddCollection C# (CSharp) Method

AddCollection() public method

添加收藏
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;
            }
        }
CarDataAccess