public void AutomatedMessage() { var context = new SidejobEntities(); var bidderautomatedmessage = new AutomatedMessage { EmailAddress = BidderEmailAddress, Title = Phasetitle, Message = Biddermessage }; var posterautomatedmessage = new AutomatedMessage { EmailAddress = PosterEmailAddress, Title = Phasetitle, Message = Postermessage }; context.AddToAutomatedMessages(bidderautomatedmessage); context.AddToAutomatedMessages(posterautomatedmessage); context.SaveChanges(); }