public void EnterDealComment(string userName, int dealId, string dealComment) { int userAccessId; using (var context = DataAccess.GetNoTrackingDataContext()) { userAccessId = UserCompiledQueries.FunGetUserAccessID(context, userName); } using (var context = DataAccess.GetDataContext()) { var comment = new Tbl_DealComment { UserAccessID = userAccessId, CommentPostedDate = DateTime.Now, CommentStatus = 1, CommentDescription = dealComment, DealID = dealId }; context.Tbl_DealComments.InsertOnSubmit(comment); context.SubmitChanges(); } }
partial void DeleteTbl_DealComment(Tbl_DealComment instance);
partial void UpdateTbl_DealComment(Tbl_DealComment instance);
partial void InsertTbl_DealComment(Tbl_DealComment instance);
private void detach_Tbl_DealComments(Tbl_DealComment entity) { this.SendPropertyChanging(); entity.Tbl_Deal = null; }
private void attach_Tbl_DealComments(Tbl_DealComment entity) { this.SendPropertyChanging(); entity.Tbl_UserAccess = this; }