2014年2月16日
摘要: Dashboard控制面板​NewPageProjectionContent内容Content DefinitionBlog博客Queries筛选Comments评论Taxonomies分类方法Widgets部件​Media媒体Profiles配置文件Navigation导航Tags标签Modules模块Themes主题Workflows工作流Users用户Reports报表​Settings设置 阅读全文
posted @ 2014-02-16 22:42 buyone 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 生成Content Part需要生成的对象列表A content part itself:这是一个继承ContentPart 或ContentPart(T表示对应的record类型) 的普通类。如果不需要保存在数据库,则使用ContentPart,如果希望把数据存储在数据库中,则使用ContentPartA content part record:这是一个简单的POCO实体对象,这个对象代表part的数据。Orchard负责从底层数据库中获取和更新数据,所以这里除了定义你的record之外不用做任何其他事情。A handler:Handler继承自ContentHandler,负责告诉Orch 阅读全文
posted @ 2014-02-16 22:14 buyone 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 以Orchard.WebShop为例Models: 当前模块中所提供的独有的内容部分的领域模型类和对应的数据记录类。继承于ContentPartRecord,约定以Record结尾,比如ProductRecord, 属性成员以virtual修饰(Nhibernate持久化类的要求)public class ProductRecord : ContentPartRecord { public virtual decimal Price { get; set; } public virtual string Sku { get; set; } }View C... 阅读全文
posted @ 2014-02-16 19:07 buyone 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 2种方法第一种:运行orchard程序,登录到后台管理页面单击左边菜单的Modules在Filter输入框中输入Code启用Code Generation在目录Orchard.Source.1.7.2\src\Orchard.Web\bin下双击Orchard.exe弹出的cmd窗口,显示初始化中,初始化完成后,输入codegen module Orchard.News, 显示如下:Initializing Orchard session. (This might take a few seconds...)Type "?" for help, "exit&quo 阅读全文
posted @ 2014-02-16 18:05 buyone 阅读(278) 评论(0) 推荐(1) 编辑
摘要: 元数据(编译以后的最基本数据单元)就是一大堆的表,当编译程序集或者模块时,编译器会创建一个类定义表,一个字段定义表,和一个方法定义表等。反射 详细请查看这里测试程序using System;using System.Collections.Generic;using System.Diagnostics;using System.Linq;using System.Reflection;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] a... 阅读全文
posted @ 2014-02-16 15:11 buyone 阅读(1047) 评论(0) 推荐(0) 编辑