public int InsertIntoEntity(BusinessService b) { BusinessMessage bm = new BusinessMessage(); //bm.StarterID = b.StaterID; bm.ReceiveID = b.ReceiveID; bm.BusinessID = b.BusinessID; bm.TimeStamp = b.TimeStamp; bm.State = 0; bm.IsRead = 0; bm.Type = b.Type; context.BusinessMessages.Add(bm); context.SaveChanges(); return bm.Id; }
public int InsertIntoEntity(BusinessService b) { BusinessMessage bm = new BusinessMessage(); //bm.StarterID = b.StaterID; bm.ReceiveID = b.ReceiveID; bm.BusinessID = b.BusinessID; bm.TimeStamp = b.TimeStamp; bm.State = 0; bm.IsRead = 0; bm.Type = b.Type; context.BusinessMessages.Add(bm); context.SaveChanges(); return(bm.Id); }