public static bool AddDefault(ParkGate model) { if (model == null) { throw new ArgumentNullException("model"); } IParkGate factory = ParkGateFactory.GetFactory(); bool result = factory.Add(model); if (result) { OperateLogServices.AddOperateLog <ParkGate>(model, OperateType.Add); } return(result); }
public static bool Add(ParkGate model) { if (model == null) { throw new ArgumentNullException("model"); } model.GateID = GuidGenerator.GetGuid().ToString(); IParkGate factory = ParkGateFactory.GetFactory(); bool result = factory.Add(model); if (result) { OperateLogServices.AddOperateLog <ParkGate>(model, OperateType.Add); } return(result); }