mirror of https://github.com/abpframework/abp.git
committed by
GitHub
1165 changed files with 127863 additions and 9422 deletions
@ -0,0 +1,63 @@ |
|||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.AspNetCore.Mvc.ApplicationModels; |
||||
|
using Microsoft.AspNetCore.Mvc.Versioning; |
||||
|
using Volo.Abp.ApiVersioning; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc.Conventions; |
||||
|
using Volo.Abp.AspNetCore.Mvc.Versioning; |
||||
|
|
||||
|
namespace Microsoft.Extensions.DependencyInjection |
||||
|
{ |
||||
|
public static class AbpApiVersioningExtensions |
||||
|
{ |
||||
|
public static IServiceCollection AddAbpApiVersioning(this IServiceCollection services, Action<ApiVersioningOptions> setupAction) |
||||
|
{ |
||||
|
services.AddTransient<IRequestedApiVersion, HttpContextRequestedApiVersion>(); |
||||
|
services.AddTransient<IApiControllerSpecification, AbpConventionalApiControllerSpecification>(); |
||||
|
|
||||
|
services.AddApiVersioning(setupAction); |
||||
|
|
||||
|
return services; |
||||
|
} |
||||
|
|
||||
|
public static void ConfigureAbp(this ApiVersioningOptions options, AbpAspNetCoreMvcOptions mvcOptions) |
||||
|
{ |
||||
|
foreach (var setting in mvcOptions.ConventionalControllers.ConventionalControllerSettings) |
||||
|
{ |
||||
|
if (setting.ApiVersionConfigurer == null) |
||||
|
{ |
||||
|
ConfigureApiVersionsByConvention(options, setting); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
setting.ApiVersionConfigurer.Invoke(options); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private static void ConfigureApiVersionsByConvention(ApiVersioningOptions options, ConventionalControllerSetting setting) |
||||
|
{ |
||||
|
foreach (var controllerType in setting.ControllerTypes) |
||||
|
{ |
||||
|
var controllerBuilder = options.Conventions.Controller(controllerType); |
||||
|
|
||||
|
if (setting.ApiVersions.Any()) |
||||
|
{ |
||||
|
foreach (var apiVersion in setting.ApiVersions) |
||||
|
{ |
||||
|
controllerBuilder.HasApiVersion(apiVersion); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (!controllerType.IsDefined(typeof(ApiVersionAttribute), true)) |
||||
|
{ |
||||
|
controllerBuilder.IsApiVersionNeutral(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,61 +0,0 @@ |
|||||
using System.Linq; |
|
||||
using Microsoft.AspNetCore.Mvc; |
|
||||
using Microsoft.AspNetCore.Mvc.Versioning; |
|
||||
using Volo.Abp.ApiVersioning; |
|
||||
using Volo.Abp.AspNetCore.Mvc; |
|
||||
using Volo.Abp.AspNetCore.Mvc.Conventions; |
|
||||
using Volo.Abp.AspNetCore.Mvc.Versioning; |
|
||||
|
|
||||
namespace Microsoft.Extensions.DependencyInjection |
|
||||
{ |
|
||||
public static class AbpApiVersioningOptionsExtensions |
|
||||
{ |
|
||||
public static void ConfigureAbp(this ApiVersioningOptions options, IServiceCollection services) |
|
||||
{ |
|
||||
//TODO: Use new builder will be released with Api Versioning 2.1 instead of reflection!
|
|
||||
|
|
||||
services.AddTransient<IRequestedApiVersion, HttpContextRequestedApiVersion>(); |
|
||||
|
|
||||
services.Configure<AbpAspNetCoreMvcOptions>(op => |
|
||||
{ |
|
||||
//TODO: Configuring api version should be done directly inside ConfigureAbp,
|
|
||||
//TODO: not in a callback that will be called by MVC later! For that, we immediately need to controllerAssemblySettings
|
|
||||
|
|
||||
foreach (var setting in op.ConventionalControllers.ConventionalControllerSettings) |
|
||||
{ |
|
||||
if (setting.ApiVersionConfigurer == null) |
|
||||
{ |
|
||||
ConfigureApiVersionsByConvention(options, setting); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
setting.ApiVersionConfigurer.Invoke(options); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
private static void ConfigureApiVersionsByConvention(ApiVersioningOptions options, ConventionalControllerSetting setting) |
|
||||
{ |
|
||||
foreach (var controllerType in setting.ControllerTypes) |
|
||||
{ |
|
||||
var controllerBuilder = options.Conventions.Controller(controllerType); |
|
||||
|
|
||||
if (setting.ApiVersions.Any()) |
|
||||
{ |
|
||||
foreach (var apiVersion in setting.ApiVersions) |
|
||||
{ |
|
||||
controllerBuilder.HasApiVersion(apiVersion); |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
if (!controllerType.IsDefined(typeof(ApiVersionAttribute), true)) |
|
||||
{ |
|
||||
controllerBuilder.IsApiVersionNeutral(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,25 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc.ApplicationModels; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Conventions |
||||
|
{ |
||||
|
public class AbpConventionalApiControllerSpecification : IApiControllerSpecification |
||||
|
{ |
||||
|
private readonly AbpAspNetCoreMvcOptions _options; |
||||
|
|
||||
|
public AbpConventionalApiControllerSpecification(IOptions<AbpAspNetCoreMvcOptions> options) |
||||
|
{ |
||||
|
_options = options.Value; |
||||
|
} |
||||
|
|
||||
|
public bool IsSatisfiedBy(ControllerModel controller) |
||||
|
{ |
||||
|
var configuration = _options |
||||
|
.ConventionalControllers |
||||
|
.ConventionalControllerSettings |
||||
|
.GetSettingOrNull(controller.ControllerType.AsType()); |
||||
|
|
||||
|
return configuration != null; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Newtonsoft.Json; |
||||
|
using Newtonsoft.Json.Serialization; |
||||
|
using System; |
||||
|
using System.Reflection; |
||||
|
using Volo.Abp.Json.Newtonsoft; |
||||
|
using Volo.Abp.Reflection; |
||||
|
using Volo.Abp.Timing; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Json |
||||
|
{ |
||||
|
public class AbpMvcJsonContractResolver : CamelCasePropertyNamesContractResolver |
||||
|
{ |
||||
|
private readonly Lazy<AbpJsonIsoDateTimeConverter> _dateTimeConverter; |
||||
|
|
||||
|
public AbpMvcJsonContractResolver(IServiceCollection services) |
||||
|
{ |
||||
|
_dateTimeConverter = services.GetServiceLazy<AbpJsonIsoDateTimeConverter>(); |
||||
|
} |
||||
|
|
||||
|
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) |
||||
|
{ |
||||
|
JsonProperty property = base.CreateProperty(member, memberSerialization); |
||||
|
|
||||
|
ModifyProperty(member, property); |
||||
|
|
||||
|
return property; |
||||
|
} |
||||
|
|
||||
|
protected virtual void ModifyProperty(MemberInfo member, JsonProperty property) |
||||
|
{ |
||||
|
if (property.PropertyType != typeof(DateTime) && property.PropertyType != typeof(DateTime?)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault<DisableDateTimeNormalizationAttribute>(member) == null) |
||||
|
{ |
||||
|
property.Converter = _dateTimeConverter.Value; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using Volo.Abp.Cli.ProjectBuilding.Building; |
||||
|
using Volo.Abp.Cli.ProjectBuilding.Building.Steps; |
||||
|
|
||||
|
namespace Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule |
||||
|
{ |
||||
|
public class MvcModuleTemplate : TemplateInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// "mvc-module".
|
||||
|
/// </summary>
|
||||
|
public const string TemplateName = "mvc-module"; |
||||
|
|
||||
|
public MvcModuleTemplate() |
||||
|
: base(TemplateName) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public override IEnumerable<ProjectBuildPipelineStep> GetCustomSteps(ProjectBuildContext context) |
||||
|
{ |
||||
|
var steps = new List<ProjectBuildPipelineStep>(); |
||||
|
|
||||
|
DeleteUnrelatedProjects(context, steps); |
||||
|
|
||||
|
return steps; |
||||
|
} |
||||
|
|
||||
|
private void DeleteUnrelatedProjects(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
||||
|
{ |
||||
|
if (context.BuildArgs.ExtraProperties.ContainsKey("no-ui")) |
||||
|
{ |
||||
|
steps.Add(new RemoveProjectFromSolutionStep( |
||||
|
"MyCompanyName.MyProjectName.Web" |
||||
|
)); |
||||
|
|
||||
|
steps.Add(new RemoveProjectFromSolutionStep( |
||||
|
"MyCompanyName.MyProjectName.Web.Host", |
||||
|
projectFolderPath: "/host/MyCompanyName.MyProjectName.Web.Host" |
||||
|
)); |
||||
|
|
||||
|
steps.Add(new RemoveProjectFromSolutionStep( |
||||
|
"MyCompanyName.MyProjectName.Web.Unified", |
||||
|
projectFolderPath: "/host/MyCompanyName.MyProjectName.Web.Unified" |
||||
|
)); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,18 +0,0 @@ |
|||||
using Volo.Abp.Cli.ProjectBuilding.Building; |
|
||||
|
|
||||
namespace Volo.Abp.Cli.ProjectBuilding.Templates |
|
||||
{ |
|
||||
public class MvcModuleTemplate : TemplateInfo |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// "mvc-module".
|
|
||||
/// </summary>
|
|
||||
public const string TemplateName = "mvc-module"; |
|
||||
|
|
||||
public MvcModuleTemplate() |
|
||||
: base(TemplateName) |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,18 +0,0 @@ |
|||||
using Volo.Abp.Cli.ProjectBuilding.Building; |
|
||||
|
|
||||
namespace Volo.Abp.Cli.ProjectBuilding.Templates |
|
||||
{ |
|
||||
public class ServiceTemplate : TemplateInfo |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// "service".
|
|
||||
/// </summary>
|
|
||||
public const string TemplateName = "service"; |
|
||||
|
|
||||
public ServiceTemplate() |
|
||||
: base(TemplateName) |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,16 @@ |
|||||
|
using Volo.Abp.Emailing.Templates.VirtualFiles; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public class DefaultEmailTemplateProvider : EmailTemplateDefinitionProvider |
||||
|
{ |
||||
|
public override void Define(IEmailTemplateDefinitionContext context) |
||||
|
{ |
||||
|
context.Add(new EmailTemplateDefinition(StandardEmailTemplates.DefaultLayout, isLayout: true, layout: null) |
||||
|
.AddTemplateVirtualFiles("/Volo/Abp/Emailing/Templates/DefaultEmailTemplates/Layout")); |
||||
|
|
||||
|
context.Add(new EmailTemplateDefinition(StandardEmailTemplates.SimpleMessage) |
||||
|
.AddTemplateVirtualFiles("/Volo/Abp/Emailing/Templates/DefaultEmailTemplates/Message")); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,22 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public class EmailTemplateContributorList : List<IEmailTemplateContributor> |
||||
|
{ |
||||
|
public string GetOrNull(string cultureName) |
||||
|
{ |
||||
|
foreach (var contributor in this.AsQueryable().Reverse()) |
||||
|
{ |
||||
|
var templateString = contributor.GetOrNull(cultureName); |
||||
|
if (templateString != null) |
||||
|
{ |
||||
|
return templateString; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.Collections.Immutable; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public class EmailTemplateDefinitionContext : IEmailTemplateDefinitionContext |
||||
|
{ |
||||
|
protected Dictionary<string, EmailTemplateDefinition> EmailTemplates { get; } |
||||
|
|
||||
|
public EmailTemplateDefinitionContext(Dictionary<string, EmailTemplateDefinition> emailTemplates) |
||||
|
{ |
||||
|
EmailTemplates = emailTemplates; |
||||
|
} |
||||
|
|
||||
|
public virtual EmailTemplateDefinition GetOrNull(string name) |
||||
|
{ |
||||
|
return EmailTemplates.GetOrDefault(name); |
||||
|
} |
||||
|
|
||||
|
public virtual IReadOnlyList<EmailTemplateDefinition> GetAll() |
||||
|
{ |
||||
|
return EmailTemplates.Values.ToImmutableList(); |
||||
|
} |
||||
|
|
||||
|
public virtual void Add(params EmailTemplateDefinition[] definitions) |
||||
|
{ |
||||
|
if (definitions.IsNullOrEmpty()) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
foreach (var definition in definitions) |
||||
|
{ |
||||
|
EmailTemplates[definition.Name] = definition; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,74 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Collections.Immutable; |
||||
|
using System.Linq; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public class EmailTemplateDefinitionManager : IEmailTemplateDefinitionManager, ISingletonDependency |
||||
|
{ |
||||
|
protected Lazy<IDictionary<string, EmailTemplateDefinition>> EmailTemplateDefinitions { get; } |
||||
|
|
||||
|
protected EmailTemplateOptions Options { get; } |
||||
|
|
||||
|
protected IServiceProvider ServiceProvider { get; } |
||||
|
|
||||
|
public EmailTemplateDefinitionManager( |
||||
|
IOptions<EmailTemplateOptions> options, |
||||
|
IServiceProvider serviceProvider) |
||||
|
{ |
||||
|
ServiceProvider = serviceProvider; |
||||
|
Options = options.Value; |
||||
|
|
||||
|
EmailTemplateDefinitions = |
||||
|
new Lazy<IDictionary<string, EmailTemplateDefinition>>(CreateEmailTemplateDefinitions, true); |
||||
|
} |
||||
|
|
||||
|
public virtual EmailTemplateDefinition Get(string name) |
||||
|
{ |
||||
|
Check.NotNull(name, nameof(name)); |
||||
|
|
||||
|
var template = GetOrNull(name); |
||||
|
|
||||
|
if (template == null) |
||||
|
{ |
||||
|
throw new AbpException("Undefined template: " + name); |
||||
|
} |
||||
|
|
||||
|
return template; |
||||
|
} |
||||
|
|
||||
|
public virtual IReadOnlyList<EmailTemplateDefinition> GetAll() |
||||
|
{ |
||||
|
return EmailTemplateDefinitions.Value.Values.ToImmutableList(); |
||||
|
} |
||||
|
|
||||
|
public virtual EmailTemplateDefinition GetOrNull(string name) |
||||
|
{ |
||||
|
return EmailTemplateDefinitions.Value.GetOrDefault(name); |
||||
|
} |
||||
|
|
||||
|
protected virtual IDictionary<string, EmailTemplateDefinition> CreateEmailTemplateDefinitions() |
||||
|
{ |
||||
|
var templates = new Dictionary<string, EmailTemplateDefinition>(); |
||||
|
|
||||
|
using (var scope = ServiceProvider.CreateScope()) |
||||
|
{ |
||||
|
var providers = Options |
||||
|
.DefinitionProviders |
||||
|
.Select(p => scope.ServiceProvider.GetRequiredService(p) as IEmailTemplateDefinitionProvider) |
||||
|
.ToList(); |
||||
|
|
||||
|
foreach (var provider in providers) |
||||
|
{ |
||||
|
provider.Define(new EmailTemplateDefinitionContext(templates)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return templates; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public abstract class EmailTemplateDefinitionProvider : IEmailTemplateDefinitionProvider, ITransientDependency |
||||
|
{ |
||||
|
public abstract void Define(IEmailTemplateDefinitionContext context); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public class EmailTemplateInitializationContext |
||||
|
{ |
||||
|
public EmailTemplateDefinition EmailTemplateDefinition { get; } |
||||
|
|
||||
|
public IServiceProvider ServiceProvider { get; } |
||||
|
|
||||
|
public EmailTemplateInitializationContext(EmailTemplateDefinition emailTemplateDefinition, |
||||
|
IServiceProvider serviceProvider) |
||||
|
{ |
||||
|
EmailTemplateDefinition = emailTemplateDefinition; |
||||
|
ServiceProvider = serviceProvider; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,26 +1,18 @@ |
|||||
using System.Collections.Generic; |
using Volo.Abp.Collections; |
||||
using Volo.Abp.Emailing.Templates.Virtual; |
|
||||
|
|
||||
namespace Volo.Abp.Emailing.Templates |
namespace Volo.Abp.Emailing.Templates |
||||
{ |
{ |
||||
public class EmailTemplateOptions |
public class EmailTemplateOptions |
||||
{ |
{ |
||||
public List<IEmailTemplateProviderContributor> Providers { get; } |
|
||||
|
|
||||
public EmailTemplateDefinitionDictionary Templates { get; } |
|
||||
|
|
||||
public string DefaultLayout { get; set; } |
public string DefaultLayout { get; set; } |
||||
|
|
||||
|
public ITypeList<IEmailTemplateDefinitionProvider> DefinitionProviders { get; } |
||||
|
|
||||
public EmailTemplateOptions() |
public EmailTemplateOptions() |
||||
{ |
{ |
||||
Providers = new List<IEmailTemplateProviderContributor> |
|
||||
{ |
|
||||
new VirtualFileEmailTemplateProviderContributor() |
|
||||
}; |
|
||||
|
|
||||
Templates = new EmailTemplateDefinitionDictionary(); |
|
||||
|
|
||||
DefaultLayout = StandardEmailTemplates.DefaultLayout; |
DefaultLayout = StandardEmailTemplates.DefaultLayout; |
||||
|
|
||||
|
DefinitionProviders = new TypeList<IEmailTemplateDefinitionProvider>(); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
@ -1,20 +0,0 @@ |
|||||
using System; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
|
|
||||
namespace Volo.Abp.Emailing.Templates |
|
||||
{ |
|
||||
public class EmailTemplateProviderContributorContext : IServiceProviderAccessor |
|
||||
{ |
|
||||
public string Name { get; } |
|
||||
|
|
||||
public IServiceProvider ServiceProvider { get; } |
|
||||
|
|
||||
public EmailTemplate Template { get; set; } |
|
||||
|
|
||||
public EmailTemplateProviderContributorContext(string name, IServiceProvider serviceProvider) |
|
||||
{ |
|
||||
Name = name; |
|
||||
ServiceProvider = serviceProvider; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,9 @@ |
|||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public interface IEmailTemplateContributor |
||||
|
{ |
||||
|
void Initialize(EmailTemplateInitializationContext context); |
||||
|
|
||||
|
string GetOrNull(string cultureName); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public interface IEmailTemplateDefinitionContext |
||||
|
{ |
||||
|
EmailTemplateDefinition GetOrNull(string name); |
||||
|
|
||||
|
void Add(params EmailTemplateDefinition[] definitions); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using JetBrains.Annotations; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public interface IEmailTemplateDefinitionManager |
||||
|
{ |
||||
|
[NotNull] |
||||
|
EmailTemplateDefinition Get([NotNull] string name); |
||||
|
|
||||
|
IReadOnlyList<EmailTemplateDefinition> GetAll(); |
||||
|
|
||||
|
EmailTemplateDefinition GetOrNull(string name); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public interface IEmailTemplateDefinitionProvider |
||||
|
{ |
||||
|
void Define(IEmailTemplateDefinitionContext context); |
||||
|
} |
||||
|
} |
||||
@ -1,9 +0,0 @@ |
|||||
using System.Threading.Tasks; |
|
||||
|
|
||||
namespace Volo.Abp.Emailing.Templates |
|
||||
{ |
|
||||
public interface IEmailTemplateProviderContributor |
|
||||
{ |
|
||||
Task ProvideAsync(EmailTemplateProviderContributorContext contributorContext); |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,9 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public interface ITemplateRender |
||||
|
{ |
||||
|
Task<string> RenderAsync(string template, object model = null); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using Scriban; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates |
||||
|
{ |
||||
|
public class TemplateRender : ITemplateRender, ITransientDependency |
||||
|
{ |
||||
|
public async Task<string> RenderAsync(string template, object model = null) |
||||
|
{ |
||||
|
var scribanTemplate = Template.Parse(template); |
||||
|
return await scribanTemplate.RenderAsync(model); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,16 +0,0 @@ |
|||||
namespace Volo.Abp.Emailing.Templates.Virtual |
|
||||
{ |
|
||||
public static class EmailTemplateDefinitionExtensions |
|
||||
{ |
|
||||
public static EmailTemplateDefinition SetVirtualFilePath(this EmailTemplateDefinition emailTemplateDefinition, string path) |
|
||||
{ |
|
||||
emailTemplateDefinition[VirtualFileEmailTemplateProviderContributor.VirtualFilePathKey] = path; |
|
||||
return emailTemplateDefinition; |
|
||||
} |
|
||||
|
|
||||
public static string GetVirtualFilePathOrNull(this EmailTemplateDefinition emailTemplateDefinition) |
|
||||
{ |
|
||||
return emailTemplateDefinition[VirtualFileEmailTemplateProviderContributor.VirtualFilePathKey] as string; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,14 +0,0 @@ |
|||||
using System.Collections.Generic; |
|
||||
|
|
||||
namespace Volo.Abp.Emailing.Templates.Virtual |
|
||||
{ |
|
||||
public class VirtualFileEmailTemplateOptions |
|
||||
{ |
|
||||
public IDictionary<string, string> Templates { get; } |
|
||||
|
|
||||
public VirtualFileEmailTemplateOptions() |
|
||||
{ |
|
||||
Templates = new Dictionary<string, string>(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,61 +0,0 @@ |
|||||
using System.Collections.Generic; |
|
||||
using System.Threading.Tasks; |
|
||||
using Microsoft.Extensions.DependencyInjection; |
|
||||
using Microsoft.Extensions.FileProviders; |
|
||||
using Microsoft.Extensions.Options; |
|
||||
using Volo.Abp.VirtualFileSystem; |
|
||||
|
|
||||
namespace Volo.Abp.Emailing.Templates.Virtual |
|
||||
{ |
|
||||
public class VirtualFileEmailTemplateProviderContributor : IEmailTemplateProviderContributor |
|
||||
{ |
|
||||
public const string VirtualFilePathKey = "VirtualFilePath"; |
|
||||
|
|
||||
public Task ProvideAsync(EmailTemplateProviderContributorContext contributorContext) |
|
||||
{ |
|
||||
var templateDefinition = FindTemplateDefinition(contributorContext); |
|
||||
if (templateDefinition == null) |
|
||||
{ |
|
||||
return Task.CompletedTask; |
|
||||
} |
|
||||
|
|
||||
var fileInfo = FindVirtualFileInfo(contributorContext, templateDefinition); |
|
||||
if (fileInfo == null) |
|
||||
{ |
|
||||
return Task.CompletedTask; |
|
||||
} |
|
||||
|
|
||||
contributorContext.Template = new EmailTemplate(fileInfo.ReadAsString(), templateDefinition); |
|
||||
return Task.CompletedTask; |
|
||||
} |
|
||||
|
|
||||
protected virtual EmailTemplateDefinition FindTemplateDefinition(EmailTemplateProviderContributorContext contributorContext) |
|
||||
{ |
|
||||
return contributorContext |
|
||||
.ServiceProvider |
|
||||
.GetRequiredService<IOptions<EmailTemplateOptions>>() |
|
||||
.Value |
|
||||
.Templates |
|
||||
.GetOrDefault(contributorContext.Name); |
|
||||
} |
|
||||
|
|
||||
protected virtual IFileInfo FindVirtualFileInfo(EmailTemplateProviderContributorContext contributorContext, EmailTemplateDefinition templateDefinition) |
|
||||
{ |
|
||||
var virtualFilePath = templateDefinition?.GetVirtualFilePathOrNull(); |
|
||||
if (virtualFilePath == null) |
|
||||
{ |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
var virtualFileProvider = contributorContext.ServiceProvider.GetRequiredService<IVirtualFileProvider>(); |
|
||||
|
|
||||
var fileInfo = virtualFileProvider.GetFileInfo(virtualFilePath); |
|
||||
if (fileInfo?.Exists != true) |
|
||||
{ |
|
||||
return null; |
|
||||
} |
|
||||
|
|
||||
return fileInfo; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,19 @@ |
|||||
|
namespace Volo.Abp.Emailing.Templates.VirtualFiles |
||||
|
{ |
||||
|
public static class EmailTemplateDefinitionExtensions |
||||
|
{ |
||||
|
public static EmailTemplateDefinition AddTemplateVirtualFile( |
||||
|
this EmailTemplateDefinition emailTemplateDefinition, string path) |
||||
|
{ |
||||
|
emailTemplateDefinition.Contributors.Add(new SingleVirtualFileEmailTemplateContributor(path)); |
||||
|
return emailTemplateDefinition; |
||||
|
} |
||||
|
|
||||
|
public static EmailTemplateDefinition AddTemplateVirtualFiles( |
||||
|
this EmailTemplateDefinition emailTemplateDefinition, string path) |
||||
|
{ |
||||
|
emailTemplateDefinition.Contributors.Add(new MultipleVirtualFilesEmailTemplateContributor(path)); |
||||
|
return emailTemplateDefinition; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,68 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.FileProviders; |
||||
|
using Volo.Abp.VirtualFileSystem; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates.VirtualFiles |
||||
|
{ |
||||
|
public class MultipleVirtualFilesEmailTemplateContributor : IEmailTemplateContributor |
||||
|
{ |
||||
|
private readonly string _virtualPath; |
||||
|
|
||||
|
private IVirtualFileProvider _virtualFileProvider; |
||||
|
|
||||
|
private Dictionary<string, string> _templateDictionary; |
||||
|
|
||||
|
private readonly object _syncObj = new object(); |
||||
|
|
||||
|
public MultipleVirtualFilesEmailTemplateContributor(string virtualPath) |
||||
|
{ |
||||
|
_virtualPath = virtualPath; |
||||
|
} |
||||
|
|
||||
|
public void Initialize(EmailTemplateInitializationContext context) |
||||
|
{ |
||||
|
_virtualFileProvider = context.ServiceProvider.GetRequiredService<IVirtualFileProvider>(); |
||||
|
} |
||||
|
|
||||
|
public string GetOrNull(string cultureName) |
||||
|
{ |
||||
|
return GetTemplateDictionary().GetOrDefault(cultureName); |
||||
|
} |
||||
|
|
||||
|
private Dictionary<string, string> GetTemplateDictionary() |
||||
|
{ |
||||
|
var dictionaries = _templateDictionary; |
||||
|
if (dictionaries != null) |
||||
|
{ |
||||
|
return dictionaries; |
||||
|
} |
||||
|
|
||||
|
lock (_syncObj) |
||||
|
{ |
||||
|
dictionaries = _templateDictionary; |
||||
|
if (dictionaries != null) |
||||
|
{ |
||||
|
return dictionaries; |
||||
|
} |
||||
|
|
||||
|
_templateDictionary = new Dictionary<string, string>(); |
||||
|
foreach (var file in _virtualFileProvider.GetDirectoryContents(_virtualPath)) |
||||
|
{ |
||||
|
if (file.IsDirectory) |
||||
|
{ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
// TODO: How to normalize file names?
|
||||
|
_templateDictionary.Add(file.Name.RemovePostFix(".tpl"), file.ReadAsString()); |
||||
|
} |
||||
|
|
||||
|
dictionaries = _templateDictionary; |
||||
|
} |
||||
|
|
||||
|
return dictionaries; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.FileProviders; |
||||
|
using Volo.Abp.VirtualFileSystem; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Templates.VirtualFiles |
||||
|
{ |
||||
|
public class SingleVirtualFileEmailTemplateContributor : IEmailTemplateContributor |
||||
|
{ |
||||
|
private readonly string _virtualPath; |
||||
|
|
||||
|
private IVirtualFileProvider _virtualFileProvider; |
||||
|
|
||||
|
public SingleVirtualFileEmailTemplateContributor(string virtualPath) |
||||
|
{ |
||||
|
_virtualPath = virtualPath; |
||||
|
} |
||||
|
|
||||
|
public void Initialize(EmailTemplateInitializationContext context) |
||||
|
{ |
||||
|
_virtualFileProvider = context.ServiceProvider.GetRequiredService<IVirtualFileProvider>(); |
||||
|
} |
||||
|
|
||||
|
public string GetOrNull(string cultureName) |
||||
|
{ |
||||
|
var file = _virtualFileProvider.GetFileInfo(_virtualPath); |
||||
|
if (file == null || !file.Exists || file.IsDirectory) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
return file.ReadAsString(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,10 +1,10 @@ |
|||||
using System.Collections.Generic; |
using Volo.Abp.Domain.Entities; |
||||
|
|
||||
namespace Volo.Abp.Domain.Repositories.MemoryDb |
namespace Volo.Abp.Domain.Repositories.MemoryDb |
||||
{ |
{ |
||||
public interface IMemoryDatabase |
public interface IMemoryDatabase |
||||
{ |
{ |
||||
List<TEntity> Collection<TEntity>(); |
IMemoryDatabaseCollection<TEntity> Collection<TEntity>() where TEntity : class, IEntity; |
||||
|
|
||||
TKey GenerateNextId<TEntity, TKey>(); |
TKey GenerateNextId<TEntity, TKey>(); |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,13 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Volo.Abp.Domain.Repositories.MemoryDb |
||||
|
{ |
||||
|
public interface IMemoryDatabaseCollection<TEntity> : IEnumerable<TEntity> |
||||
|
{ |
||||
|
void Add(TEntity entity); |
||||
|
|
||||
|
void Update(TEntity entity); |
||||
|
|
||||
|
void Remove(TEntity entity); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Volo.Abp.Domain.Repositories.MemoryDb |
||||
|
{ |
||||
|
public interface IMemoryDbSerializer |
||||
|
{ |
||||
|
byte[] Serialize(object obj); |
||||
|
|
||||
|
object Deserialize(byte[] value, Type type); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
using System; |
||||
|
using System.Collections; |
||||
|
using System.Collections.Generic; |
||||
|
using Volo.Abp.Domain.Entities; |
||||
|
|
||||
|
namespace Volo.Abp.Domain.Repositories.MemoryDb |
||||
|
{ |
||||
|
public class MemoryDatabaseCollection<TEntity> : IMemoryDatabaseCollection<TEntity> |
||||
|
where TEntity : class, IEntity |
||||
|
{ |
||||
|
private readonly Dictionary<string, byte[]> _dictionary = new Dictionary<string, byte[]>(); |
||||
|
|
||||
|
private readonly IMemoryDbSerializer _memoryDbSerializer; |
||||
|
|
||||
|
public MemoryDatabaseCollection(IMemoryDbSerializer memoryDbSerializer) |
||||
|
{ |
||||
|
_memoryDbSerializer = memoryDbSerializer; |
||||
|
} |
||||
|
|
||||
|
public IEnumerator<TEntity> GetEnumerator() |
||||
|
{ |
||||
|
foreach (var entity in _dictionary.Values) |
||||
|
{ |
||||
|
yield return _memoryDbSerializer.Deserialize(entity, typeof(TEntity)).As<TEntity>(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
IEnumerator IEnumerable.GetEnumerator() |
||||
|
{ |
||||
|
return GetEnumerator(); |
||||
|
} |
||||
|
|
||||
|
public void Add(TEntity entity) |
||||
|
{ |
||||
|
_dictionary.Add(GetEntityKey(entity), _memoryDbSerializer.Serialize(entity)); |
||||
|
} |
||||
|
|
||||
|
public void Update(TEntity entity) |
||||
|
{ |
||||
|
if (_dictionary.ContainsKey(GetEntityKey(entity))) |
||||
|
{ |
||||
|
_dictionary[GetEntityKey(entity)] = _memoryDbSerializer.Serialize(entity); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void Remove(TEntity entity) |
||||
|
{ |
||||
|
_dictionary.Remove(GetEntityKey(entity)); |
||||
|
} |
||||
|
|
||||
|
private string GetEntityKey(TEntity entity) |
||||
|
{ |
||||
|
return entity.GetKeys().JoinAsString(","); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,19 +1,25 @@ |
|||||
using System.Collections.Concurrent; |
using System; |
||||
|
using System.Collections.Concurrent; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
namespace Volo.Abp.Domain.Repositories.MemoryDb |
namespace Volo.Abp.Domain.Repositories.MemoryDb |
||||
{ |
{ |
||||
public static class MemoryDatabaseManager |
public class MemoryDatabaseManager : ISingletonDependency |
||||
{ |
{ |
||||
private static ConcurrentDictionary<string, IMemoryDatabase> _databases; |
private readonly ConcurrentDictionary<string, IMemoryDatabase> _databases = |
||||
|
new ConcurrentDictionary<string, IMemoryDatabase>(); |
||||
|
|
||||
static MemoryDatabaseManager() |
private readonly IServiceProvider _serviceProvider; |
||||
|
|
||||
|
public MemoryDatabaseManager(IServiceProvider serviceProvider) |
||||
{ |
{ |
||||
_databases = new ConcurrentDictionary<string, IMemoryDatabase>(); |
_serviceProvider = serviceProvider; |
||||
} |
} |
||||
|
|
||||
public static IMemoryDatabase Get(string databaseName) |
public IMemoryDatabase Get(string databaseName) |
||||
{ |
{ |
||||
return _databases.GetOrAdd(databaseName, _ => new MemoryDatabase()); |
return _databases.GetOrAdd(databaseName, _ => _serviceProvider.GetRequiredService<IMemoryDatabase>()); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
using System; |
||||
|
using System.Text; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Json; |
||||
|
|
||||
|
namespace Volo.Abp.Domain.Repositories.MemoryDb |
||||
|
{ |
||||
|
public class Utf8JsonMemoryDbSerializer : IMemoryDbSerializer, ITransientDependency |
||||
|
{ |
||||
|
private readonly IJsonSerializer _jsonSerializer; |
||||
|
|
||||
|
public Utf8JsonMemoryDbSerializer(IJsonSerializer jsonSerializer) |
||||
|
{ |
||||
|
_jsonSerializer = jsonSerializer; |
||||
|
} |
||||
|
|
||||
|
byte[] IMemoryDbSerializer.Serialize(object obj) |
||||
|
{ |
||||
|
return Encoding.UTF8.GetBytes(_jsonSerializer.Serialize(obj)); |
||||
|
} |
||||
|
|
||||
|
public object Deserialize(byte[] value, Type type) |
||||
|
{ |
||||
|
return _jsonSerializer.Deserialize(type, Encoding.UTF8.GetString(value)); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,19 +1,19 @@ |
|||||
using Microsoft.Extensions.DependencyInjection.Extensions; |
using Microsoft.Extensions.DependencyInjection.Extensions; |
||||
using Volo.Abp.Domain; |
using Volo.Abp.Domain; |
||||
|
using Volo.Abp.Domain.Repositories.MemoryDb; |
||||
|
using Volo.Abp.Json; |
||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
using Volo.Abp.Uow.MemoryDb; |
using Volo.Abp.Uow.MemoryDb; |
||||
|
|
||||
namespace Volo.Abp.MemoryDb |
namespace Volo.Abp.MemoryDb |
||||
{ |
{ |
||||
/* TODO: Consider to store objects as binary serialized in the memory, which makes unit tests more realistic. |
|
||||
*/ |
|
||||
|
|
||||
[DependsOn(typeof(AbpDddDomainModule))] |
[DependsOn(typeof(AbpDddDomainModule))] |
||||
public class AbpMemoryDbModule : AbpModule |
public class AbpMemoryDbModule : AbpModule |
||||
{ |
{ |
||||
public override void ConfigureServices(ServiceConfigurationContext context) |
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
{ |
{ |
||||
context.Services.TryAddTransient(typeof(IMemoryDatabaseProvider<>), typeof(UnitOfWorkMemoryDatabaseProvider<>)); |
context.Services.TryAddTransient(typeof(IMemoryDatabaseProvider<>), typeof(UnitOfWorkMemoryDatabaseProvider<>)); |
||||
|
context.Services.TryAddTransient(typeof(IMemoryDatabaseCollection<>), typeof(MemoryDatabaseCollection<>)); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,10 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace Volo.Abp.Timing |
||||
|
{ |
||||
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Parameter)] |
||||
|
public class DisableDateTimeNormalizationAttribute : Attribute |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -1,9 +0,0 @@ |
|||||
using Volo.Abp.Application.Services; |
|
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App.Compat |
|
||||
{ |
|
||||
public interface ITodoAppService : IApplicationService |
|
||||
{ |
|
||||
string Get(int id); |
|
||||
} |
|
||||
} |
|
||||
@ -1,25 +0,0 @@ |
|||||
using Volo.Abp.ApiVersioning; |
|
||||
using Volo.Abp.Application.Services; |
|
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App.Compat |
|
||||
{ |
|
||||
public class TodoAppService : ApplicationService, ITodoAppService |
|
||||
{ |
|
||||
private readonly IRequestedApiVersion _requestedApiVersion; |
|
||||
|
|
||||
public TodoAppService(IRequestedApiVersion requestedApiVersion) |
|
||||
{ |
|
||||
_requestedApiVersion = requestedApiVersion; |
|
||||
} |
|
||||
|
|
||||
public string Get(int id) |
|
||||
{ |
|
||||
return "Compat-" + id + "-" + GetVersionOrNone(); |
|
||||
} |
|
||||
|
|
||||
private string GetVersionOrNone() |
|
||||
{ |
|
||||
return _requestedApiVersion.Current ?? "NONE"; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,9 +0,0 @@ |
|||||
using Volo.Abp.Application.Services; |
|
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App |
|
||||
{ |
|
||||
public interface ITodoAppService : IApplicationService |
|
||||
{ |
|
||||
string Get(int id); |
|
||||
} |
|
||||
} |
|
||||
@ -1,25 +0,0 @@ |
|||||
using Volo.Abp.ApiVersioning; |
|
||||
using Volo.Abp.Application.Services; |
|
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App |
|
||||
{ |
|
||||
public class TodoAppService : ApplicationService, ITodoAppService |
|
||||
{ |
|
||||
private readonly IRequestedApiVersion _requestedApiVersion; |
|
||||
|
|
||||
public TodoAppService(IRequestedApiVersion requestedApiVersion) |
|
||||
{ |
|
||||
_requestedApiVersion = requestedApiVersion; |
|
||||
} |
|
||||
|
|
||||
public string Get(int id) |
|
||||
{ |
|
||||
return id + "-" + GetVersionOrNone(); |
|
||||
} |
|
||||
|
|
||||
private string GetVersionOrNone() |
|
||||
{ |
|
||||
return _requestedApiVersion.Current ?? "NONE"; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,9 @@ |
|||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App.v1 |
||||
|
{ |
||||
|
public interface ITodoAppService : IApplicationService |
||||
|
{ |
||||
|
string Get(int id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
using Volo.Abp.ApiVersioning; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App.v1 |
||||
|
{ |
||||
|
public class TodoAppService : ApplicationService, ITodoAppService |
||||
|
{ |
||||
|
private readonly IRequestedApiVersion _requestedApiVersion; |
||||
|
|
||||
|
public TodoAppService(IRequestedApiVersion requestedApiVersion) |
||||
|
{ |
||||
|
_requestedApiVersion = requestedApiVersion; |
||||
|
} |
||||
|
|
||||
|
public string Get(int id) |
||||
|
{ |
||||
|
return $"Compat-{id}-{GetVersionOrNone()}"; |
||||
|
} |
||||
|
|
||||
|
private string GetVersionOrNone() |
||||
|
{ |
||||
|
return _requestedApiVersion.Current ?? "NONE"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App.v2 |
||||
|
{ |
||||
|
public interface ITodoAppService : IApplicationService |
||||
|
{ |
||||
|
string Get(int id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
using Volo.Abp.ApiVersioning; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Versioning.App.v2 |
||||
|
{ |
||||
|
public class TodoAppService : ApplicationService, ITodoAppService |
||||
|
{ |
||||
|
private readonly IRequestedApiVersion _requestedApiVersion; |
||||
|
|
||||
|
public TodoAppService(IRequestedApiVersion requestedApiVersion) |
||||
|
{ |
||||
|
_requestedApiVersion = requestedApiVersion; |
||||
|
} |
||||
|
|
||||
|
public string Get(int id) |
||||
|
{ |
||||
|
return id + "-" + GetVersionOrNone(); |
||||
|
} |
||||
|
|
||||
|
private string GetVersionOrNone() |
||||
|
{ |
||||
|
return _requestedApiVersion.Current ?? "NONE"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,23 +0,0 @@ |
|||||
using Microsoft.Extensions.DependencyInjection; |
|
||||
using Shouldly; |
|
||||
using Volo.Abp.AspNetCore.Mvc.Versioning.App.Compat; |
|
||||
using Xunit; |
|
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Versioning.Test.Compat |
|
||||
{ |
|
||||
public class TodoAppService_Tests : AspNetCoreMvcVersioningTestBase |
|
||||
{ |
|
||||
private readonly ITodoAppService _todoAppService; |
|
||||
|
|
||||
public TodoAppService_Tests() |
|
||||
{ |
|
||||
_todoAppService = ServiceProvider.GetRequiredService<ITodoAppService>(); |
|
||||
} |
|
||||
|
|
||||
[Fact(Skip = "It stopped working after ASP.NET Core 2.2 Upgrade. Should work on that.")] |
|
||||
public void Get() |
|
||||
{ |
|
||||
_todoAppService.Get(42).ShouldBe("Compat-42-1.0"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,23 +0,0 @@ |
|||||
using Microsoft.Extensions.DependencyInjection; |
|
||||
using Shouldly; |
|
||||
using Volo.Abp.AspNetCore.Mvc.Versioning.App; |
|
||||
using Xunit; |
|
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.Versioning.Test |
|
||||
{ |
|
||||
public class TodoAppService_Tests : AspNetCoreMvcVersioningTestBase |
|
||||
{ |
|
||||
private readonly ITodoAppService _todoAppService; |
|
||||
|
|
||||
public TodoAppService_Tests() |
|
||||
{ |
|
||||
_todoAppService = ServiceProvider.GetRequiredService<ITodoAppService>(); |
|
||||
} |
|
||||
|
|
||||
[Fact(Skip = "It stopped working after ASP.NET Core 2.2 Upgrade. Should work on that.")] |
|
||||
public void Get() |
|
||||
{ |
|
||||
_todoAppService.Get(42).ShouldBe("42-2.0"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,23 @@ |
|||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Shouldly; |
||||
|
using Volo.Abp.AspNetCore.Mvc.Versioning.App.v1; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Versioning.Test.v1 |
||||
|
{ |
||||
|
public class TodoAppService_Tests : AspNetCoreMvcVersioningTestBase |
||||
|
{ |
||||
|
private readonly ITodoAppService _todoAppService; |
||||
|
|
||||
|
public TodoAppService_Tests() |
||||
|
{ |
||||
|
_todoAppService = ServiceProvider.GetRequiredService<ITodoAppService>(); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void Get() |
||||
|
{ |
||||
|
_todoAppService.Get(42).ShouldBe("Compat-42-1.0"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Shouldly; |
||||
|
using Volo.Abp.AspNetCore.Mvc.Versioning.App.v2; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.Versioning.Test.v2 |
||||
|
{ |
||||
|
public class TodoAppService_Tests : AspNetCoreMvcVersioningTestBase |
||||
|
{ |
||||
|
private readonly ITodoAppService _todoAppService; |
||||
|
|
||||
|
public TodoAppService_Tests() |
||||
|
{ |
||||
|
_todoAppService = ServiceProvider.GetRequiredService<ITodoAppService>(); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void Get() |
||||
|
{ |
||||
|
_todoAppService.Get(42).ShouldBe("42-2.0"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,64 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Shouldly; |
||||
|
using Volo.Abp.Emailing.Templates; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing |
||||
|
{ |
||||
|
public class EmailTemplateRender_Tests : AbpIntegratedTest<AbpEmailingTestModule> |
||||
|
{ |
||||
|
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) |
||||
|
{ |
||||
|
options.UseAutofac(); |
||||
|
} |
||||
|
|
||||
|
private readonly ITemplateRender _templateRender; |
||||
|
|
||||
|
public EmailTemplateRender_Tests() |
||||
|
{ |
||||
|
_templateRender = GetRequiredService<ITemplateRender>(); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public async Task RenderAsync() |
||||
|
{ |
||||
|
var template = "Hello {{email}} {{ for order in orders }}{{ order.id }}:{{ order.name }},{{ end }}"; |
||||
|
|
||||
|
var model = new ModelClass |
||||
|
{ |
||||
|
Email = "john@abp.io", |
||||
|
Orders = new List<ModelClass.Order> |
||||
|
{ |
||||
|
new ModelClass.Order |
||||
|
{ |
||||
|
Id = "1", |
||||
|
Name = "iphone" |
||||
|
}, |
||||
|
new ModelClass.Order |
||||
|
{ |
||||
|
Id = "2", |
||||
|
Name = "ipad" |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
var result = await _templateRender.RenderAsync(template, model); |
||||
|
result.ShouldBe("Hello john@abp.io 1:iphone,2:ipad,"); |
||||
|
} |
||||
|
|
||||
|
public class ModelClass |
||||
|
{ |
||||
|
public string Email { get; set; } |
||||
|
|
||||
|
public List<Order> Orders { get; set; } |
||||
|
|
||||
|
public class Order |
||||
|
{ |
||||
|
public string Id { get; set; } |
||||
|
|
||||
|
public string Name { get; set; } |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing.Localization |
||||
|
{ |
||||
|
public class AbpEmailingTestResource |
||||
|
{ |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"culture": "en", |
||||
|
"texts": { |
||||
|
"hello": "hello" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"culture": "tr", |
||||
|
"texts": { |
||||
|
"hello": "Merhaba" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
using Volo.Abp.Emailing.Localization; |
||||
|
using Volo.Abp.Emailing.Templates; |
||||
|
using Volo.Abp.Emailing.Templates.VirtualFiles; |
||||
|
|
||||
|
namespace Volo.Abp.Emailing |
||||
|
{ |
||||
|
public class TestEmailTemplateProvider : EmailTemplateDefinitionProvider |
||||
|
{ |
||||
|
public override void Define(IEmailTemplateDefinitionContext context) |
||||
|
{ |
||||
|
var template1 = new EmailTemplateDefinition("template1", defaultCultureName: "en", layout: null) |
||||
|
.AddTemplateVirtualFiles("/Volo/Abp/Emailing/TestTemplates/Template1"); |
||||
|
context.Add(template1); |
||||
|
|
||||
|
var template2 = new EmailTemplateDefinition("template2", layout: StandardEmailTemplates.DefaultLayout) |
||||
|
.AddTemplateVirtualFiles("/Volo/Abp/Emailing/TestTemplates/Template2"); |
||||
|
context.Add(template2); |
||||
|
|
||||
|
var template3 = new EmailTemplateDefinition("template3", layout: null, singleTemplateFile: true, localizationResource: typeof(AbpEmailingTestResource)) |
||||
|
.AddTemplateVirtualFile("/Volo/Abp/Emailing/TestTemplates/Template3/Template.tpl"); |
||||
|
context.Add(template3); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,4 @@ |
|||||
|
Please confirm your email address by clicking the link below. |
||||
|
We may need to send you critical information about our service and it is important that we have an accurate email address. |
||||
|
|
||||
|
<a href="#">Confirm email address</a> |
||||
@ -0,0 +1,4 @@ |
|||||
|
Lütfen aşağıdaki bağlantıya tıklayarak e-posta adresinizi onaylayın. |
||||
|
Size hizmetimizle ilgili kritik bilgileri göndermemiz gerekebilir ve doğru bir e-posta adresimizin olması önemlidir. |
||||
|
|
||||
|
<a href="#">E-posta adresini onayla</a> |
||||
@ -0,0 +1,4 @@ |
|||||
|
Please confirm your email address by clicking the link below. |
||||
|
We may need to send you critical information about our service and it is important that we have an accurate email address. |
||||
|
|
||||
|
<a href="#">Confirm email address</a> |
||||
@ -0,0 +1 @@ |
|||||
|
{{#L:hello}} Abp |
||||
@ -1,9 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> |
|
||||
<head> |
|
||||
<meta charset="utf-8" /> |
|
||||
</head> |
|
||||
<body> |
|
||||
This is a test template! |
|
||||
</body> |
|
||||
</html> |
|
||||
@ -1,28 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore; |
|
||||
using MyCompanyName.MyProjectName.EntityFrameworkCore; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
using Volo.Abp.Identity.EntityFrameworkCore; |
|
||||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|
||||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.DemoApp |
|
||||
{ |
|
||||
public class DemoAppDbContext : AbpDbContext<DemoAppDbContext> |
|
||||
{ |
|
||||
public DemoAppDbContext(DbContextOptions<DemoAppDbContext> options) |
|
||||
: base(options) |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
base.OnModelCreating(modelBuilder); |
|
||||
|
|
||||
modelBuilder.ConfigurePermissionManagement(); |
|
||||
modelBuilder.ConfigureSettingManagement(); |
|
||||
modelBuilder.ConfigureIdentity(); |
|
||||
modelBuilder.ConfigureMyProjectName(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,29 +0,0 @@ |
|||||
using System.IO; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Design; |
|
||||
using Microsoft.Extensions.Configuration; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.DemoApp |
|
||||
{ |
|
||||
public class DemoAppDbContextFactory : IDesignTimeDbContextFactory<DemoAppDbContext> |
|
||||
{ |
|
||||
public DemoAppDbContext CreateDbContext(string[] args) |
|
||||
{ |
|
||||
var configuration = BuildConfiguration(); |
|
||||
|
|
||||
var builder = new DbContextOptionsBuilder<DemoAppDbContext>() |
|
||||
.UseSqlServer(configuration.GetConnectionString("Default")); |
|
||||
|
|
||||
return new DemoAppDbContext(builder.Options); |
|
||||
} |
|
||||
|
|
||||
private static IConfigurationRoot BuildConfiguration() |
|
||||
{ |
|
||||
var builder = new ConfigurationBuilder() |
|
||||
.SetBasePath(Directory.GetCurrentDirectory()) |
|
||||
.AddJsonFile("appsettings.json", optional: false); |
|
||||
|
|
||||
return builder.Build(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,131 +0,0 @@ |
|||||
using Microsoft.AspNetCore.Builder; |
|
||||
using Microsoft.AspNetCore.Hosting; |
|
||||
using Microsoft.Extensions.Configuration; |
|
||||
using Microsoft.Extensions.DependencyInjection; |
|
||||
using MyCompanyName.MyProjectName.EntityFrameworkCore; |
|
||||
using Swashbuckle.AspNetCore.Swagger; |
|
||||
using System.IO; |
|
||||
using System.Linq; |
|
||||
using Volo.Abp; |
|
||||
using Volo.Abp.Account.Web; |
|
||||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; |
|
||||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; |
|
||||
using Volo.Abp.Authorization.Permissions; |
|
||||
using Volo.Abp.Autofac; |
|
||||
using Volo.Abp.Data; |
|
||||
using Volo.Abp.EntityFrameworkCore; |
|
||||
using Volo.Abp.EntityFrameworkCore.SqlServer; |
|
||||
using Volo.Abp.Identity; |
|
||||
using Volo.Abp.Identity.EntityFrameworkCore; |
|
||||
using Volo.Abp.Identity.Web; |
|
||||
using Volo.Abp.Localization; |
|
||||
using Volo.Abp.Modularity; |
|
||||
using Volo.Abp.PermissionManagement; |
|
||||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|
||||
using Volo.Abp.PermissionManagement.Identity; |
|
||||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
||||
using Volo.Abp.Threading; |
|
||||
using Volo.Abp.VirtualFileSystem; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.DemoApp |
|
||||
{ |
|
||||
[DependsOn( |
|
||||
typeof(MyProjectNameWebModule), |
|
||||
typeof(MyProjectNameApplicationModule), |
|
||||
typeof(MyProjectNameEntityFrameworkCoreModule), |
|
||||
|
|
||||
typeof(AbpPermissionManagementEntityFrameworkCoreModule), |
|
||||
typeof(AbpSettingManagementEntityFrameworkCoreModule), |
|
||||
typeof(AbpIdentityEntityFrameworkCoreModule), |
|
||||
typeof(AbpEntityFrameworkCoreSqlServerModule), |
|
||||
|
|
||||
typeof(AbpAccountWebModule), |
|
||||
typeof(AbpIdentityWebModule), |
|
||||
typeof(AbpIdentityApplicationModule), |
|
||||
typeof(AbpPermissionManagementApplicationModule), |
|
||||
typeof(AbpPermissionManagementDomainIdentityModule), |
|
||||
typeof(AbpAutofacModule), |
|
||||
typeof(AbpAspNetCoreMvcUiBasicThemeModule) |
|
||||
)] |
|
||||
public class DemoAppModule : AbpModule |
|
||||
{ |
|
||||
public override void ConfigureServices(ServiceConfigurationContext context) |
|
||||
{ |
|
||||
var hostingEnvironment = context.Services.GetHostingEnvironment(); |
|
||||
var configuration = context.Services.BuildConfiguration(); |
|
||||
|
|
||||
Configure<DbConnectionOptions>(options => |
|
||||
{ |
|
||||
options.ConnectionStrings.Default = configuration.GetConnectionString("Default"); |
|
||||
}); |
|
||||
|
|
||||
Configure<AbpDbContextOptions>(options => |
|
||||
{ |
|
||||
options.UseSqlServer(); |
|
||||
}); |
|
||||
|
|
||||
if (hostingEnvironment.IsDevelopment()) |
|
||||
{ |
|
||||
Configure<VirtualFileSystemOptions>(options => |
|
||||
{ |
|
||||
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Web", Path.DirectorySeparatorChar))); |
|
||||
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Domain", Path.DirectorySeparatorChar))); |
|
||||
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Application", Path.DirectorySeparatorChar))); |
|
||||
options.FileSets.ReplaceEmbeddedByPhysical<MyProjectNameApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}MyCompanyName.MyProjectName.Application.Contracts", Path.DirectorySeparatorChar))); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
context.Services.AddSwaggerGen( |
|
||||
options => |
|
||||
{ |
|
||||
options.SwaggerDoc("v1", new Info { Title = "MyProjectName API", Version = "v1" }); |
|
||||
options.DocInclusionPredicate((docName, description) => true); |
|
||||
options.CustomSchemaIds(type => type.FullName); |
|
||||
}); |
|
||||
|
|
||||
Configure<AbpLocalizationOptions>(options => |
|
||||
{ |
|
||||
options.Languages.Add(new LanguageInfo("en", "en", "English")); |
|
||||
//...add other languages
|
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|
||||
{ |
|
||||
var app = context.GetApplicationBuilder(); |
|
||||
|
|
||||
if (context.GetEnvironment().IsDevelopment()) |
|
||||
{ |
|
||||
app.UseDeveloperExceptionPage(); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
app.UseErrorPage(); |
|
||||
} |
|
||||
|
|
||||
app.UseVirtualFiles(); |
|
||||
|
|
||||
app.UseSwagger(); |
|
||||
app.UseSwaggerUI(options => |
|
||||
{ |
|
||||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API"); |
|
||||
}); |
|
||||
|
|
||||
app.UseAuthentication(); |
|
||||
app.UseAbpRequestLocalization(); |
|
||||
app.UseAuditing(); |
|
||||
|
|
||||
app.UseMvcWithDefaultRouteAndArea(); |
|
||||
|
|
||||
using (var scope = context.ServiceProvider.CreateScope()) |
|
||||
{ |
|
||||
AsyncHelper.RunSync(async () => |
|
||||
{ |
|
||||
await scope.ServiceProvider |
|
||||
.GetRequiredService<IDataSeeder>() |
|
||||
.SeedAsync(); |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,421 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using MyCompanyName.MyProjectName.DemoApp; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.DemoApp.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(DemoAppDbContext))] |
|
||||
[Migration("20190410095748_Initial")] |
|
||||
partial class Initial |
|
||||
{ |
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.IsRequired() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties"); |
|
||||
|
|
||||
b.Property<bool>("IsStatic"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("Regex") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<string>("RegexDescription") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<bool>("Required"); |
|
||||
|
|
||||
b.Property<int>("ValueType"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.ToTable("AbpClaimTypes"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.IsRequired() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties"); |
|
||||
|
|
||||
b.Property<bool>("IsDefault") |
|
||||
.HasColumnName("IsDefault"); |
|
||||
|
|
||||
b.Property<bool>("IsPublic") |
|
||||
.HasColumnName("IsPublic"); |
|
||||
|
|
||||
b.Property<bool>("IsStatic") |
|
||||
.HasColumnName("IsStatic"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("NormalizedName") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("NormalizedName"); |
|
||||
|
|
||||
b.ToTable("AbpRoles"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ClaimType") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ClaimValue") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<Guid>("RoleId"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleId"); |
|
||||
|
|
||||
b.ToTable("AbpRoleClaims"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<int>("AccessFailedCount") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("AccessFailedCount") |
|
||||
.HasDefaultValue(0); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime"); |
|
||||
|
|
||||
b.Property<string>("Email") |
|
||||
.HasColumnName("Email") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<bool>("EmailConfirmed") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("EmailConfirmed") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId"); |
|
||||
|
|
||||
b.Property<bool>("LockoutEnabled") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("LockoutEnabled") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTimeOffset?>("LockoutEnd"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.HasColumnName("Name") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("NormalizedEmail") |
|
||||
.HasColumnName("NormalizedEmail") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("NormalizedUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("NormalizedUserName") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("PasswordHash") |
|
||||
.HasColumnName("PasswordHash") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("PhoneNumber") |
|
||||
.HasColumnName("PhoneNumber") |
|
||||
.HasMaxLength(16); |
|
||||
|
|
||||
b.Property<bool>("PhoneNumberConfirmed") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("PhoneNumberConfirmed") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<string>("SecurityStamp") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SecurityStamp") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("Surname") |
|
||||
.HasColumnName("Surname") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId"); |
|
||||
|
|
||||
b.Property<bool>("TwoFactorEnabled") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("TwoFactorEnabled") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("UserName") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Email"); |
|
||||
|
|
||||
b.HasIndex("NormalizedEmail"); |
|
||||
|
|
||||
b.HasIndex("NormalizedUserName"); |
|
||||
|
|
||||
b.HasIndex("UserName"); |
|
||||
|
|
||||
b.ToTable("AbpUsers"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ClaimType") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ClaimValue") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId"); |
|
||||
|
|
||||
b.ToTable("AbpUserClaims"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|
||||
{ |
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.Property<string>("LoginProvider") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderDisplayName") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(196); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("UserId", "LoginProvider"); |
|
||||
|
|
||||
b.HasIndex("LoginProvider", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpUserLogins"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|
||||
{ |
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.Property<Guid>("RoleId"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("UserId", "RoleId"); |
|
||||
|
|
||||
b.HasIndex("RoleId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AbpUserRoles"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|
||||
{ |
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.Property<string>("LoginProvider") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.Property<string>("Value"); |
|
||||
|
|
||||
b.HasKey("UserId", "LoginProvider", "Name"); |
|
||||
|
|
||||
b.ToTable("AbpUserTokens"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpPermissionGrants"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityRole") |
|
||||
.WithMany("Claims") |
|
||||
.HasForeignKey("RoleId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Claims") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Logins") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityRole") |
|
||||
.WithMany() |
|
||||
.HasForeignKey("RoleId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
|
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Roles") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Tokens") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,313 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.DemoApp.Migrations |
|
||||
{ |
|
||||
public partial class Initial : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpClaimTypes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Required = table.Column<bool>(nullable: false), |
|
||||
IsStatic = table.Column<bool>(nullable: false), |
|
||||
Regex = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
RegexDescription = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
Description = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
ValueType = table.Column<int>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpPermissionGrants", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
ProviderName = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
ProviderKey = table.Column<string>(maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpRoles", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
NormalizedName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
IsDefault = table.Column<bool>(nullable: false), |
|
||||
IsStatic = table.Column<bool>(nullable: false), |
|
||||
IsPublic = table.Column<bool>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpRoles", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpSettings", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 2048, nullable: false), |
|
||||
ProviderName = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ProviderKey = table.Column<string>(maxLength: 64, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpSettings", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUsers", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(nullable: true), |
|
||||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
DeleterId = table.Column<Guid>(nullable: true), |
|
||||
DeletionTime = table.Column<DateTime>(nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
Surname = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
Email = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
EmailConfirmed = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
PasswordHash = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
SecurityStamp = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
PhoneNumber = table.Column<string>(maxLength: 16, nullable: true), |
|
||||
PhoneNumberConfirmed = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
TwoFactorEnabled = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
LockoutEnd = table.Column<DateTimeOffset>(nullable: true), |
|
||||
LockoutEnabled = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
AccessFailedCount = table.Column<int>(nullable: false, defaultValue: 0) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpUsers", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpRoleClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ClaimType = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true), |
|
||||
RoleId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpRoleClaims_AbpRoles_RoleId", |
|
||||
column: x => x.RoleId, |
|
||||
principalTable: "AbpRoles", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserClaims", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ClaimType = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpUserClaims", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpUserClaims_AbpUsers_UserId", |
|
||||
column: x => x.UserId, |
|
||||
principalTable: "AbpUsers", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserLogins", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ProviderKey = table.Column<string>(maxLength: 196, nullable: false), |
|
||||
ProviderDisplayName = table.Column<string>(maxLength: 128, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpUserLogins_AbpUsers_UserId", |
|
||||
column: x => x.UserId, |
|
||||
principalTable: "AbpUsers", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserRoles", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
RoleId = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpUserRoles_AbpRoles_RoleId", |
|
||||
column: x => x.RoleId, |
|
||||
principalTable: "AbpRoles", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpUserRoles_AbpUsers_UserId", |
|
||||
column: x => x.UserId, |
|
||||
principalTable: "AbpUsers", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpUserTokens", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
UserId = table.Column<Guid>(nullable: false), |
|
||||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Value = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpUserTokens_AbpUsers_UserId", |
|
||||
column: x => x.UserId, |
|
||||
principalTable: "AbpUsers", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
|
||||
table: "AbpPermissionGrants", |
|
||||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpRoleClaims_RoleId", |
|
||||
table: "AbpRoleClaims", |
|
||||
column: "RoleId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpRoles_NormalizedName", |
|
||||
table: "AbpRoles", |
|
||||
column: "NormalizedName"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|
||||
table: "AbpSettings", |
|
||||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpUserClaims_UserId", |
|
||||
table: "AbpUserClaims", |
|
||||
column: "UserId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpUserLogins_LoginProvider_ProviderKey", |
|
||||
table: "AbpUserLogins", |
|
||||
columns: new[] { "LoginProvider", "ProviderKey" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpUserRoles_RoleId_UserId", |
|
||||
table: "AbpUserRoles", |
|
||||
columns: new[] { "RoleId", "UserId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpUsers_Email", |
|
||||
table: "AbpUsers", |
|
||||
column: "Email"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpUsers_NormalizedEmail", |
|
||||
table: "AbpUsers", |
|
||||
column: "NormalizedEmail"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpUsers_NormalizedUserName", |
|
||||
table: "AbpUsers", |
|
||||
column: "NormalizedUserName"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpUsers_UserName", |
|
||||
table: "AbpUsers", |
|
||||
column: "UserName"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpClaimTypes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpPermissionGrants"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpRoleClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpSettings"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserLogins"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserTokens"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUsers"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,419 +0,0 @@ |
|||||
// <auto-generated />
|
|
||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|
||||
using MyCompanyName.MyProjectName.DemoApp; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.DemoApp.Migrations |
|
||||
{ |
|
||||
[DbContext(typeof(DemoAppDbContext))] |
|
||||
partial class DemoAppDbContextModelSnapshot : ModelSnapshot |
|
||||
{ |
|
||||
protected override void BuildModel(ModelBuilder modelBuilder) |
|
||||
{ |
|
||||
#pragma warning disable 612, 618
|
|
||||
modelBuilder |
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687") |
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.IsRequired() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("Description") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties"); |
|
||||
|
|
||||
b.Property<bool>("IsStatic"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("Regex") |
|
||||
.HasMaxLength(512); |
|
||||
|
|
||||
b.Property<string>("RegexDescription") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<bool>("Required"); |
|
||||
|
|
||||
b.Property<int>("ValueType"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.ToTable("AbpClaimTypes"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.IsRequired() |
|
||||
.HasColumnName("ConcurrencyStamp") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties"); |
|
||||
|
|
||||
b.Property<bool>("IsDefault") |
|
||||
.HasColumnName("IsDefault"); |
|
||||
|
|
||||
b.Property<bool>("IsPublic") |
|
||||
.HasColumnName("IsPublic"); |
|
||||
|
|
||||
b.Property<bool>("IsStatic") |
|
||||
.HasColumnName("IsStatic"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("NormalizedName") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("NormalizedName"); |
|
||||
|
|
||||
b.ToTable("AbpRoles"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ClaimType") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ClaimValue") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<Guid>("RoleId"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("RoleId"); |
|
||||
|
|
||||
b.ToTable("AbpRoleClaims"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<int>("AccessFailedCount") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("AccessFailedCount") |
|
||||
.HasDefaultValue(0); |
|
||||
|
|
||||
b.Property<string>("ConcurrencyStamp") |
|
||||
.IsConcurrencyToken() |
|
||||
.HasColumnName("ConcurrencyStamp"); |
|
||||
|
|
||||
b.Property<DateTime>("CreationTime") |
|
||||
.HasColumnName("CreationTime"); |
|
||||
|
|
||||
b.Property<Guid?>("CreatorId") |
|
||||
.HasColumnName("CreatorId"); |
|
||||
|
|
||||
b.Property<Guid?>("DeleterId") |
|
||||
.HasColumnName("DeleterId"); |
|
||||
|
|
||||
b.Property<DateTime?>("DeletionTime") |
|
||||
.HasColumnName("DeletionTime"); |
|
||||
|
|
||||
b.Property<string>("Email") |
|
||||
.HasColumnName("Email") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<bool>("EmailConfirmed") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("EmailConfirmed") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<string>("ExtraProperties") |
|
||||
.HasColumnName("ExtraProperties"); |
|
||||
|
|
||||
b.Property<bool>("IsDeleted") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("IsDeleted") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTime?>("LastModificationTime") |
|
||||
.HasColumnName("LastModificationTime"); |
|
||||
|
|
||||
b.Property<Guid?>("LastModifierId") |
|
||||
.HasColumnName("LastModifierId"); |
|
||||
|
|
||||
b.Property<bool>("LockoutEnabled") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("LockoutEnabled") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<DateTimeOffset?>("LockoutEnd"); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.HasColumnName("Name") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("NormalizedEmail") |
|
||||
.HasColumnName("NormalizedEmail") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("NormalizedUserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("NormalizedUserName") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("PasswordHash") |
|
||||
.HasColumnName("PasswordHash") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("PhoneNumber") |
|
||||
.HasColumnName("PhoneNumber") |
|
||||
.HasMaxLength(16); |
|
||||
|
|
||||
b.Property<bool>("PhoneNumberConfirmed") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("PhoneNumberConfirmed") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<string>("SecurityStamp") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("SecurityStamp") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("Surname") |
|
||||
.HasColumnName("Surname") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId") |
|
||||
.HasColumnName("TenantId"); |
|
||||
|
|
||||
b.Property<bool>("TwoFactorEnabled") |
|
||||
.ValueGeneratedOnAdd() |
|
||||
.HasColumnName("TwoFactorEnabled") |
|
||||
.HasDefaultValue(false); |
|
||||
|
|
||||
b.Property<string>("UserName") |
|
||||
.IsRequired() |
|
||||
.HasColumnName("UserName") |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Email"); |
|
||||
|
|
||||
b.HasIndex("NormalizedEmail"); |
|
||||
|
|
||||
b.HasIndex("NormalizedUserName"); |
|
||||
|
|
||||
b.HasIndex("UserName"); |
|
||||
|
|
||||
b.ToTable("AbpUsers"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("ClaimType") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(256); |
|
||||
|
|
||||
b.Property<string>("ClaimValue") |
|
||||
.HasMaxLength(1024); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("UserId"); |
|
||||
|
|
||||
b.ToTable("AbpUserClaims"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|
||||
{ |
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.Property<string>("LoginProvider") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderDisplayName") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(196); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("UserId", "LoginProvider"); |
|
||||
|
|
||||
b.HasIndex("LoginProvider", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpUserLogins"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|
||||
{ |
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.Property<Guid>("RoleId"); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("UserId", "RoleId"); |
|
||||
|
|
||||
b.HasIndex("RoleId", "UserId"); |
|
||||
|
|
||||
b.ToTable("AbpUserRoles"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|
||||
{ |
|
||||
b.Property<Guid>("UserId"); |
|
||||
|
|
||||
b.Property<string>("LoginProvider") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.Property<string>("Value"); |
|
||||
|
|
||||
b.HasKey("UserId", "LoginProvider", "Name"); |
|
||||
|
|
||||
b.ToTable("AbpUserTokens"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<Guid?>("TenantId"); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpPermissionGrants"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
|
||||
{ |
|
||||
b.Property<Guid>("Id") |
|
||||
.ValueGeneratedOnAdd(); |
|
||||
|
|
||||
b.Property<string>("Name") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(128); |
|
||||
|
|
||||
b.Property<string>("ProviderKey") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("ProviderName") |
|
||||
.HasMaxLength(64); |
|
||||
|
|
||||
b.Property<string>("Value") |
|
||||
.IsRequired() |
|
||||
.HasMaxLength(2048); |
|
||||
|
|
||||
b.HasKey("Id"); |
|
||||
|
|
||||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|
||||
|
|
||||
b.ToTable("AbpSettings"); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityRole") |
|
||||
.WithMany("Claims") |
|
||||
.HasForeignKey("RoleId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Claims") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Logins") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityRole") |
|
||||
.WithMany() |
|
||||
.HasForeignKey("RoleId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
|
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Roles") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
|
|
||||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|
||||
{ |
|
||||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|
||||
.WithMany("Tokens") |
|
||||
.HasForeignKey("UserId") |
|
||||
.OnDelete(DeleteBehavior.Cascade); |
|
||||
}); |
|
||||
#pragma warning restore 612, 618
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,38 +0,0 @@ |
|||||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" /> |
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" /> |
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" /> |
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.1.0" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.Application\MyCompanyName.MyProjectName.Application.csproj" /> |
|
||||
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.EntityFrameworkCore\MyCompanyName.MyProjectName.EntityFrameworkCore.csproj" /> |
|
||||
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.Web\MyCompanyName.MyProjectName.Web.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" /> |
|
||||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<Compile Remove="Logs\**" /> |
|
||||
<Content Remove="Logs\**" /> |
|
||||
<EmbeddedResource Remove="Logs\**" /> |
|
||||
<None Remove="Logs\**" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,4 +0,0 @@ |
|||||
@page |
|
||||
@model MyCompanyName.MyProjectName.DemoApp.Pages.IndexModel |
|
||||
<h3>Welcome to the MyProjectName demo application.</h3> |
|
||||
<a href="/Account/Login">Login</a> |
|
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue