mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Adding simple package.txt manifest files. Adding user record/model/driver to package. Wiring create user in through asp.net membership provider.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4039401
This commit is contained in:
@@ -7,27 +7,21 @@ using Orchard.Models.Driver;
|
||||
using Orchard.Models.Records;
|
||||
|
||||
namespace Orchard.Tests.Models.Stubs {
|
||||
public class Gamma : ModelPart<GammaRecord> {
|
||||
public class Gamma : ModelPartWithRecord<GammaRecord> {
|
||||
}
|
||||
|
||||
public class GammaRecord {
|
||||
public virtual int Id { get; set; }
|
||||
public virtual ModelRecord Model { get; set; }
|
||||
public class GammaRecord : ModelPartRecord {
|
||||
public virtual string Frap { get; set; }
|
||||
}
|
||||
|
||||
public class GammaRecordOverride : IAutoMappingOverride<GammaRecord> {
|
||||
public void Override(AutoMapping<GammaRecord> mapping) {
|
||||
mapping.HasOne(x => x.Model);
|
||||
}
|
||||
}
|
||||
|
||||
public class GammaDriver : ModelDriver<GammaRecord> {
|
||||
public GammaDriver(IRepository<GammaRecord> repository) : base(repository) {
|
||||
public class GammaDriver : ModelDriverWithRecord<GammaRecord> {
|
||||
public GammaDriver(IRepository<GammaRecord> repository)
|
||||
: base(repository) {
|
||||
}
|
||||
|
||||
protected override void New(NewModelContext context) {
|
||||
if(context.ModelType == "gamma") {
|
||||
if (context.ModelType == "gamma") {
|
||||
WeldModelPart<Gamma>(context);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user