我正在尝试实现 IUpdatable。
错误 1 'WebRole1.InfoManager' 没有实现接口成员 'System.Data.Services.IUpdatable.ClearChanges()' 我得到的所有错误都是说我没有实现所有接口成员,但我当然实现了一些不是全部。我没有放坑代码希望大家能看懂。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Services;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.StorageClient;
namespace WebRole1
{
public class InfoManager : IUpdatable
{
private TableServiceContext context;
// To Generate DataConnectionString and svcClient
private TableServiceContext GetContext()
{
//Implemented code
}
public CommentManager()
{
context = GetContext();
}
// To get my table infos
public IQueryable<Info> Infos
{
get
{
return context.CreateQuery<Info>("Infos").AsTableServiceQuery();
}
}
// Creating the resource and cheking the compatibility of the type and do an add Object
public Object CreateResource(string containerName, string fullTypeName)
{
//Implemented Code
}
// Return the instance of the resource represented by the object
public Object ResolveResource(Object resource)
{
return resource;
}
public void SaveChanges()
{
context.SaveChangesWithRetries();
}
public void setValue(Object targetResource, string propertyName, Object propertyValue)
{
//Implemented Code
}
}
}