PageBase

时间:2021-09-29 04:04:22
namespace Webform.App
{
public class PageBase : System.Web.UI.Page
{
} public interface IService<TEntity, TKey> : IRepository<TEntity, TKey>, IScopeDependency
where TEntity : IEntity<TKey>
{ }
public class ServiceBase<TEntity, TKey> : Repository<TEntity, TKey>
where TEntity : class, IEntity<TKey>
{
public ServiceBase(IDbContextTypeResolver contextTypeResolver) : base(contextTypeResolver)
{
} public IDbContextTypeResolver ContextTypeResolver { get; set; }
} public abstract class ListPageBase<TEntity, TKey> : PageBase
where TEntity : class, IEntity<TKey>
{
public ServiceBase<TEntity, TKey> Service { get; set; } public List<TEntity> List()
{
return this.Service.Entities.ToList();
}
} public class Atricle : EntityBase<Guid>, IAudited
{
public Atricle()
{
} /// <summary>
/// 获取或设置 文章标题
/// </summary>
[Required, StringLength()]
public string Title { get; set; } /// <summary>
/// 获取或设置 文章内容
/// </summary>
public string Content { get; set; } #region Implementation of ICreatedTime /// <summary>
/// 获取设置 信息创建时间
/// </summary>
public DateTime CreatedTime { get; set; } #endregion #region Implementation of ICreatedAudited /// <summary>
/// 获取或设置 创建者编号
/// </summary>
[StringLength()]
public string CreatorUserId { get; set; } #endregion #region Implementation of IUpdateAutited /// <summary>
/// 获取或设置 最后更新时间
/// </summary>
public DateTime? LastUpdatedTime { get; set; } /// <summary>
/// 获取或设置 最后更新者编号
/// </summary>
[StringLength()]
public string LastUpdatorUserId { get; set; } #endregion
} }

PageBase的更多相关文章

  1. PageBase 公共基础类

    PageBase 公共基础类 using System; using System.Collections.Generic; using System.Linq; using System.Web; ...

  2. 修改System&period;Web&period;Mvc&period;WebViewPage创建自己的pageBase

    <system.web.webPages.razor> <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, ...

  3. 2016-02-20WebForm登陆验证,判断用户是否登陆 PageBase类

    http://blog.csdn.net/fanbin168/article/details/49404233 很多时候,WebFrom页面,我们需要判断用户是否已经登陆了.假如有很多页面,难道我们要 ...

  4. cms &period;net webform去服务器控件标签化 pagebase新版本

    这是最近在干一个webform的cms的时候用起来的,原来虽然做过很多技术,什么remoting,wcf,webservice,可是弄来弄去,最后也没个收藏的地儿,全都放在笔记本儿上了,可是人又懒地可 ...

  5. 我的代码,写的pagebase。还是留着吧。语义化,与我的云平台一样,只不过云平台是用js写的。这个是webform&period;下回写mvc吧。核心很简单。

    Ps:记一下用的时候,一不小心我手贱碰到的问题吧:我在页面里面加上了form runat=server,然后所有的html控件就再也找不着了.就是下面的control collection这里,如果加 ...

  6. asp&period;net pagebase获取缓存的方法

    public string GetSysConfigByKey(string key) { if (object.Equals(HttpContext.Current.Cache["Cach ...

  7. 封装一下webform的公用方法:对于软件我把这些全封装在pagebase里面,这样所有的页面只调用一句 Init&lpar;&rpar;即可,其他的全在页面上配置

      /// <summary>         /// 绑定新闻列表,带分页与查询         /// </summary>         /// <param n ...

  8. &period;net 网站首页,本次的项目中用到的一个网站首页中统计网页访问量的工具方法,我觉得它应该在pagebase里面,拿来用一下

    需要建立一个根文件夹 ~/xml/couter.txt #region 网站访问量         protected void pageviews() {             int count ...

  9. 从零开始编写自己的C&num;框架(22)——添加普通列表页面

    普通列表页面指的是上一章那种有层次感列表以外的正常列表页面,由于上一章已讲解了正常添加页面的相关操作了,所以部分相关的操作本章节就不再罗嗦重复一次了.大家可以试试先用本章内容中的一些简单介绍,自己使用 ...

随机推荐

  1. Java继承的初始化

    /** * Created by xfyou on 2016/11/2. * Java继承的初始化 */ public class Beetle extends Insect { int k = pr ...

  2. 07 Linux su和sudo命令的区别

    一. 使用 su 命令临时切换用户身份 1.su 的适用条件和威力 su命令就是切换用户的工具,怎么理解呢?比如我们以普通用户beinan登录的,但要添加用户任务,执行useradd ,beinan用 ...

  3. &lowbar;&lowbar;slots&lowbar;&lowbar; 属性绑定

    s = Student() # 创建新的实例 s.name = 'Michael' # 绑定属性'name' s.age = 25 # 绑定属性'age' s.score = 99 # 绑定属性'sc ...

  4. &lbrack;转&rsqb;Multiple outputs from T4 made easy

    本文转自:http://damieng.com/blog/2009/01/22/multiple-outputs-from-t4-made-easy One of the things I wante ...

  5. HDU 2852 KiKi&&num;39&semi;s K-Number

    权值线段树 #include <cstdio> #include <cstring> const int N=200000,M=220000; int k,q,x,y,sum[ ...

  6. 配置nexus仓库

    Nexus有许多默认仓库:Central,Releases,Snapshots,和3rd Party 1.配置central仓库 Nexus内置了Maven*代理仓库Central.选择仓库列表中的 ...

  7. hdu More is better

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1856 题意:王老师要找一些男生帮助他完成一项工程.要求最后挑选出的男生之间都是朋友关系,可以说直接的, ...

  8. 1&period;Python

    一.Python基础:1.第一句python文件后缀名:文件后缀名是.py2.两种执行方式:(1)把文件地址交给python解释器,python解释器去找到这个文件读到内存执行(2)进入解释器:解释器 ...

  9. Git的基本使用(github)

    关于Git的基本使用: 上传本地文件到github仓库中 首先要有自己的github账号,新建仓库: saiku-3.9 其次 本地安装好 git , 在本地任意目录下新建目录 saiku-3.9, ...

  10. BloomFilter布隆过滤器

    BloomFilter 简介 当一个元素被加入集合时,通过K个散列函数将这个元素映射成一个位数组中的K个点,把它们置为1.检索时,我们只要看看这些点是不是都是1就(大约)知道集合中有没有它了:如果这些 ...

相关文章