このエラーを受け取る:
Error 4 'ZoneUpdates.Models.PgeDataContext.PgeDataContext(string, System.Data.Linq.Mapping.MappingSource)' must declare a body because it is not marked abstract, extern, or partial C:\Code\ZoneUpdates\ZoneUpdates\Models\PgeDataContext.cs 18 16 ZoneUpdates
Error 6 'ZoneUpdates.Models.ZoneObject.SendPropertyChanged(string)' must declare a body because it is not marked abstract, extern, or partial C:\Code\ZoneUpdates\ZoneUpdates\Models\PgeDataContext.cs 42 32 ZoneUpdates
基本的に、これら 4 つのクラス間で 13 のエラー (以下に 2 つを示します)。
私は4.0を使用していますが、基本的にこのコードを別のプロジェクトからコピーして貼り付け、期待どおりに動作させました。クラスを部分的に変更しようとしましたが、役に立ちませんでした。任意のポインタをいただければ幸いです。
[Database(Name = "Pge_Dev")]
public class PgeDataContext : DataContext
{
public PgeDataContext(IDbConnection connection);
public PgeDataContext(string dsn);
public PgeDataContext(
IDbConnection connection,
System.Data.Linq.Mapping.MappingSource mappingSource);
public PgeDataContext(
string connection,
System.Data.Linq.Mapping.MappingSource mappingSource);
public Table<ZoneObject> ZoneObject { get; set; }
public Table<ZoneObjType> ZoneObjType { get; set; }
public Table<ZoneTypeBridge> ZoneTypeBridge { get; set; }
}
[Table(Name = "dbo.ZoneObject")]
public class ZoneObject : INotifyPropertyChanging, INotifyPropertyChanged
{
public ZoneObject();
[Column(Storage = "ID", DbType = "Int NOT NULL")]
public int ID { get; set; }
[Column(Storage = "Name", DbType = "nvarchar(30)")]
public int Name { get; set; }
[Column(Storage = "Value", DbType = "bigint")]
public int Value { get; set; }
[Column(Storage = "CancurrencyID", DbType = "Int NOT NULL")]
public int ConcurrencyID { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
public event PropertyChangingEventHandler PropertyChanging;
protected virtual void SendPropertyChanged(string propertyName);
protected virtual void SendPropertyChanging();
}