本文整理汇总了C#中Ticket.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Ticket.Save方法的具体用法?C# Ticket.Save怎么用?C# Ticket.Save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ticket
的用法示例。
在下文中一共展示了Ticket.Save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeActiveRecord
private void InitializeActiveRecord()
{
ActiveRecordStarter.CreateSchema();
//Add some data for the demo
using(new SessionScope())
{
var andy = new User{ Name = "Andy Pike" };
andy.Save();
var amber = new User{ Name = "Amber Pike" };
amber.Save();
var george = new User { Name = "George Good" };
george.Save();
var demo = new Project{ Name = "Demo Project" };
demo.Save();
var secret = new Project { Name = "My top secret project" };
secret.Save();
var ie6Bug = new Ticket
{
Type = TicketType.Bug,
Summary = "The boxes do not line up in IE6 ;o)",
Body = "If you go to any page on the site it look terrible in IE6.",
AssignedTo = amber,
CreatedAt = DateTime.Now,
Project = demo
};
ie6Bug.Save();
var addProfilePictures = new Ticket
{
Type = TicketType.FeatureRequest,
Summary = "Show a user's photo when they login",
Body = "Show a user's Gravatar based on their email. See documentation on gravatar.com.",
AssignedTo = andy,
CreatedAt = DateTime.Now,
Project = demo
};
addProfilePictures.Save();
var filters = new Ticket
{
Type = TicketType.Bug,
Summary = "User filters not working",
Body = "When filtering the list of users, none of the options seem to change the list.",
AssignedTo = andy,
CreatedAt = DateTime.Now,
Project = secret
};
filters.Save();
}
}