public void SendMessageToVP(string MessgeID, VPMsg msg) { DataContext writeMsgHere = new DataContext(DataConnectionString); writeMsgHere.Msgs.Add(msg); writeMsgHere.SubmitChanges(); }
public VPMsg GetATextMessage(string msgID) { int MessageID = Int32.Parse(msgID); VPMsg myReturnMsg = new VPMsg(); VPMockData getdata = new VPMockData(); List<VPMsg> DemoMessages = getdata.GetMessages(); var returnMessage = (from m in DemoMessages where m.MessageID == MessageID select m).SingleOrDefault(); myReturnMsg.Message = returnMessage.Message; myReturnMsg.MessageID = returnMessage.MessageID; myReturnMsg.MsgLocation = returnMessage.MsgLocation; myReturnMsg.PhoneNumber = returnMessage.PhoneNumber; return myReturnMsg; }