public void CreateIssue(Guid issueKey, Guid issueTypeKey, Guid? issueThreadKey, string sessionKey, DateTime clientTime, IDictionary<string, string> data, DateTime serverTime) { using (var context = GetDataContext()) { var issue = new Issue { IssueKey = issueKey, IssueTypeId = context.IssueTypes.Single(x => x.IssueTypeKey == issueTypeKey).IssueTypeId, CreationClientTime = clientTime, CreationServerTime = serverTime, SessionId = context.Sessions.Single(x => x.SessionKey == sessionKey).SessionId, IssueThreadKey = issueThreadKey, }; context.Issues.InsertOnSubmit(issue); context.SubmitChanges(); if (data != null) { foreach (var d in data) { var issueData = new IssueData { IssueId = issue.IssueId, Name = d.Key, Value = d.Value, }; context.IssueDatas.InsertOnSubmit(issueData); } } context.SubmitChanges(); } }
partial void DeleteIssueData(IssueData instance);
partial void UpdateIssueData(IssueData instance);
partial void InsertIssueData(IssueData instance);
private void detach_IssueDatas(IssueData entity) { this.SendPropertyChanging(); entity.Issue = null; }
private void attach_IssueDatas(IssueData entity) { this.SendPropertyChanging(); entity.Issue = this; }