public void DeleteList <T>(IConnection conn, Criteria condition) { int rowsAffected = 0; bool stoped = false; AssistantEntity typedEntity = new AssistantEntity(typeof(T)); typedEntity.Criteria = condition; if (AssertContinueDeleting(typedEntity, out stoped)) { ObjectManager oa = _d1.GetObjectManager(typeof(T)); rowsAffected = oa.MyDeleteList(conn, condition); } }
/// <summary> /// 插入一条记录(指定数据库) /// </summary> /// <param name="conn">连接串信息</param> /// <param name="obj"></param> /// <param name="fields"></param> /// <returns></returns> public object Insert(IConnection conn, object obj, string[] fields) { //idSyc.Obj = obj; //asyncTriggerBroadcast asyCall = new asyncTriggerBroadcast(idSyc.StartBroadcast); //IAsyncResult result = asyCall.BeginInvoke(null, null); //asyCall.EndInvoke(result); ObjectManager oa = _d1.GetObjectManager(obj.GetType()); object identity; return(oa.MyInsert(conn, obj, fields, out identity)); }