62,046
社区成员
发帖
与我相关
我的任务
分享
namespace DataLib.DataLinq
{
[Table(Name = "dbo.UsergongQiuinfo")]
public class UsergongQiuinfo : INotifyPropertyChanging, INotifyPropertyChanged
{
private int _id;
private int _ClassId;
private int _SmallId;
private string _Title;
private string _AddTime;
private string _NeiRong;
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(string.Empty);
public event PropertyChangedEventHandler PropertyChanged;
public event PropertyChangingEventHandler PropertyChanging;
protected virtual void SendPropertyChanged(string propertyName)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
protected virtual void SendPropertyChanging()
{
if (this.PropertyChanging != null)
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
}
using System;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Configuration;
namespace DataLib.DataLinq
{
[Database(Name = "New_yysl")]
public class JDDataContext : DataContext
{
private static MappingSource mappingSource = new AttributeMappingSource();
public XJDataContext()
: base(ConfigurationManager.ConnectionStrings["New_YYslConnectionString1"].ConnectionString, mappingSource)
{
}
public XJDataContext(IDbConnection connection)
: base(connection, mappingSource)
{
}
public XJDataContext(string connection)
: base(connection, mappingSource)
{
}
public XJDataContext(IDbConnection connection, MappingSource mappingSource)
: base(connection, mappingSource)
{
}
public JDDataContext(string connection, MappingSource mappingSource)
: base(connection, mappingSource)
{
}
public Table<DataLib.DataLinq.UsergongQiuinfo> UsergongQiuinfo
{
get
{
return base.GetTable<DataLib.DataLinq.UsergongQiuinfo>();
}
}
}
}
this.art = this.db.NewsInfo.Single<NewsInfo>(c => c.id == NewsId);