日期:2014-05-20 浏览次数:20944 次
IDatabase db=DependencyResolver.Current.GetService<IDatabase>();
AspectF.Define
.Log(Logger.Writer, "Inserting customer the easy way")
.HowLong(Logger.Writer, "Starting customer insert", "Inserted customer in {1} seconds")
.Do(() =>
{
CustomerData data = new CustomerData();
data.Insert(firstName, lastName, age);
});
@(Ajax.Layout().Tabs("Tab1").Views(p =>
{
p.Add(Html.Global("Info")).Load(Url.Action("Information",new { AppName = "News", date = DateTime.Now }));
p.Add(Html.Global("key_Forum")).Load(Url.Action("Information", new { AppName = "Forum", date = DateTime.Now }));
p.Add(Html.Global("key_Activity")).Template(@<text></text>);
p.Add(Html.Global("key_Group")).Template(@<text></text>);
})
.Options(opts=>opts.EnabledContentCache=false)
)