Files

23 lines
574 B
C#
Raw Permalink Normal View History

2020-04-13 15:16:46 +01:00
using AutoBet.Db;
using SwiftyMessageHub.Core;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace AutoBet.DataRecorded.MessageControllers
{
public class OddsDataRecorderController : MessageController
{
[MessageRoute]
public async Task SaveSnapshot(OddsSnapshot snapshotToSave)
{
using (var db = new HorseRacingDataContext())
{
db.OddsSnapshots.Add(snapshotToSave);
await db.SaveChangesAsync();
}
}
}
}