mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Changed LayoutRecord Guid type to Guid.
This commit is contained in:
@@ -105,7 +105,7 @@ namespace Orchard.Projections.Controllers {
|
||||
model.Form = form;
|
||||
|
||||
if (ModelState.IsValid) {
|
||||
var layoutRecord = new LayoutRecord { Guid = Guid.NewGuid().ToString() ,Category = model.Category, Type = model.Type };
|
||||
var layoutRecord = new LayoutRecord { Guid = Guid.NewGuid() ,Category = model.Category, Type = model.Type };
|
||||
var query = _queryService.GetQuery(model.QueryId);
|
||||
query.Layouts.Add(layoutRecord);
|
||||
|
||||
|
@@ -173,7 +173,7 @@ namespace Orchard.Projections.Drivers {
|
||||
}
|
||||
|
||||
return new LayoutRecord {
|
||||
Guid = guid,
|
||||
Guid = !String.IsNullOrWhiteSpace(guid) ? Guid.Parse(guid) : Guid.NewGuid(),
|
||||
Category = category,
|
||||
Description = layout.Attribute("Description").Value,
|
||||
Display = int.Parse(layout.Attribute("Display").Value),
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Data;
|
||||
using System;
|
||||
using System.Data;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Contents.Extensions;
|
||||
@@ -102,7 +103,7 @@ namespace Orchard.Projections {
|
||||
SchemaBuilder.CreateTable("LayoutRecord",
|
||||
table => table
|
||||
.Column<int>("Id", c => c.PrimaryKey().Identity())
|
||||
.Column<string>("Guid", c => c.WithLength(64))
|
||||
.Column<Guid>("Guid")
|
||||
.Column<string>("Category", c => c.WithLength(64))
|
||||
.Column<string>("Type", c => c.WithLength(64))
|
||||
.Column<string>("Description", c => c.WithLength(255))
|
||||
@@ -279,7 +280,7 @@ namespace Orchard.Projections {
|
||||
|
||||
public int UpdateFrom3() {
|
||||
SchemaBuilder.AlterTable("LayoutRecord", table => table
|
||||
.AddColumn<string>("Guid", c => c.WithLength(64))
|
||||
.AddColumn<Guid>("Guid")
|
||||
);
|
||||
|
||||
SchemaBuilder.AlterTable("LayoutRecord", table => table
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.Data.Conventions;
|
||||
|
||||
@@ -9,7 +10,7 @@ namespace Orchard.Projections.Models {
|
||||
}
|
||||
|
||||
public virtual int Id { get; set; }
|
||||
public virtual string Guid { get; set; }
|
||||
public virtual Guid Guid { get; set; }
|
||||
public virtual string Description { get; set; }
|
||||
public virtual string Category { get; set; }
|
||||
public virtual string Type { get; set; }
|
||||
|
Reference in New Issue
Block a user