1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using CB.Common;
- using CB.Interface.Infrastructure;
- using CB.Entity;
- namespace CB.Data.SqlServer
- {
- public class ArticleDetailManage : Repository<ArticleDetailInfo>, IArticleDetailService
- {
- public ArticleDetailManage(string interfaceId)
- : base(interfaceId)
- {
- }
- public override bool Save(ArticleDetailInfo entity)
- {
- throw new NotImplementedException();
- }
- public override bool Update(ArticleDetailInfo entity)
- {
- throw new NotImplementedException();
- }
- public override bool Delete(int Id)
- {
- throw new NotImplementedException();
- }
- public override ArticleDetailInfo Get<TKey>(TKey key)
- {
- throw new NotImplementedException();
- }
- public override IList<ArticleDetailInfo> ToList()
- {
- throw new NotImplementedException();
- }
- public override IList<ArticleDetailInfo> ToList(ArticleDetailInfo entity)
- {
- throw new NotImplementedException();
- }
- public override IList<ArticleDetailInfo> ToPaging(ArticleDetailInfo entity, int pageSize, int pageIndex, out int recordCount)
- {
- throw new NotImplementedException();
- }
- /// <summary>
- /// IDataReader数据转换实体
- /// </summary>
- /// <param name="row">IDataReader</param>
- /// <returns></returns>
- protected override ArticleDetailInfo LoadEntity(IDataReader row)
- {
- return new ArticleDetailInfo
- {
- Id = TypeConverter.ObjectToInt(row["Id"]),
- Title = row["Title"].ToString(),
- Detail = row["Detail"].ToString(),
- EditId = TypeConverter.ObjectToInt(row["EditId"]),
- Editor = row["Editor"].ToString(),
- Addtime = TypeConverter.StrToDateTime(row["Addtime"].ToString())
- };
- }
- /// <summary>
- /// DataRow数据转换实体
- /// </summary>
- /// <param name="row">DataRow</param>
- /// <returns></returns>
- protected override ArticleDetailInfo LoadEntity(DataRow row)
- {
- return new ArticleDetailInfo
- {
- Id = TypeConverter.ObjectToInt(row["Id"]),
- Title = row["Title"].ToString(),
- Detail = row["Detail"].ToString(),
- EditId = TypeConverter.ObjectToInt(row["EditId"]),
- Editor = row["Editor"].ToString(),
- Addtime = TypeConverter.StrToDateTime(row["Addtime"].ToString())
- };
- }
- }
- }
|