|
|
@ -26,27 +26,35 @@ namespace OrmTest |
|
|
|
}).ExecuteReturnIdentity(); |
|
|
|
db.Insertable(new poetry_video_comment() |
|
|
|
{ |
|
|
|
first_reply_id = 1, |
|
|
|
reply_user_id = userid2, |
|
|
|
user_id = userid2 |
|
|
|
first_reply_id = 0, |
|
|
|
reply_user_id = 0, |
|
|
|
user_id = 0 |
|
|
|
}).ExecuteReturnIdentity(); |
|
|
|
db.Insertable(new poetry_video_comment() |
|
|
|
{ |
|
|
|
first_reply_id = 1, |
|
|
|
first_reply_id = 2, |
|
|
|
reply_user_id = userid, |
|
|
|
user_id = userid2 |
|
|
|
}).ExecuteReturnIdentity(); |
|
|
|
db.Insertable(new poetry_video_comment() |
|
|
|
{ |
|
|
|
first_reply_id = 11, |
|
|
|
reply_user_id = 11, |
|
|
|
user_id = 11 |
|
|
|
}).ExecuteReturnIdentity(); |
|
|
|
var x = db.Queryable<poetry_video_comment>().ToList(); |
|
|
|
//db.Insertable(new poetry_video_comment()
|
|
|
|
//{
|
|
|
|
// first_reply_id = 11,
|
|
|
|
// reply_user_id = 11,
|
|
|
|
// user_id = 11
|
|
|
|
//}).ExecuteReturnIdentity();
|
|
|
|
var list = db.Queryable<poetry_video_comment>() |
|
|
|
.Includes(o => o.FirstReply, o => o.ReplyUser) |
|
|
|
.Includes(o => o.FirstReply, o => o.CommentUser) |
|
|
|
.Includes(o => o.FirstReply, o => o.UserInfo) |
|
|
|
.ToList(); |
|
|
|
|
|
|
|
if (list.Last().FirstReply.UserInfo == null) |
|
|
|
{ |
|
|
|
throw new Exception("unit error"); |
|
|
|
} |
|
|
|
if (list.Last().FirstReply.ReplyUser == null) |
|
|
|
{ |
|
|
|
throw new Exception("unit error"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|