public void AddTorrentSoftPost(int idReadyPost) { autoParsingContext context = new autoParsingContext(); TorrentSoftPost post = new TorrentSoftPost() { ReadyPost_idReadyPost = idReadyPost, WasAdded = DateTime.Now, }; context.TorrentSoftPost.Add(post); context.SaveChanges(); }
private void опубликоватьToolStripMenuItem1_Click(object sender, EventArgs e) { TorrentSoftPost torrentSoftPost = new TorrentSoftPost { Name = textBox_NamePost.Text, DatePublic = dateTimePicker1.Value, Description = textBox_Description.Text, Imgs = imgsSlider.Slides, Spoilers = spoilerSlider.Slides, TorrentPath = post.TorrentPath }; TorrentSoftManager torrentSoftManager = new TorrentSoftManager(torrentSoftPost); torrentSoftManager.Add(); }