using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Samples.ServiceHosting.StorageClient;
namespace newtelligence.DasBlog.Runtime.Azure{
public class LogDataServiceContext : TableStorageDataServiceContext
{
public LogDataServiceContext(StorageAccountInfo accountInfo)
: base(accountInfo)
{
// ...
}
public IQueryable<LogDataEntity> Logs
{
get
{
return this.CreateQuery<LogDataEntity>("Logs");
}
}
public void AddEventData(LogDataEntity eventData)
{
if (eventData == null) { throw new ArgumentNullException("eventData"); }
this.AddObject("Logs", eventData);
this.SaveChanges();
}
}
}
|