public void AddComment(IPrincipal user, int idQuote, string Message) { var time = DateTime.Now; var comment = new QuoteComment { UserId = user.Identity.GetUserId(), UserName = user.Identity.GetUserName(), CreateTime = time, UpdateTime = time, Quote = idQuote, Comment = Validate(Message) }; lock (syncSubmit) db.QuoteComments.InsertOnSubmit(comment); Submit(); }
partial void UpdateQuoteComment(QuoteComment instance);
partial void DeleteQuoteComment(QuoteComment instance);
partial void InsertQuoteComment(QuoteComment instance);