easyoc / easyoc Goto Github PK
View Code? Open in Web Editor NEWEasyOC 是一个基于OrchardCore 的低代码SPA 服务端开发框架 ,前端项目 https://github.com/EasyOC/easyoc-amis-admin
License: Apache License 2.0
EasyOC 是一个基于OrchardCore 的低代码SPA 服务端开发框架 ,前端项目 https://github.com/EasyOC/easyoc-amis-admin
License: Apache License 2.0
FreeSql.Provider.MySql
要替换成
FreeSql.Provider.MySqlConnector
不然mysql引擎的时候 无法使用。
另外不能加表名前缀,不然也是
{
"message": "Table 'xxx.superuserindex' doesn't exist",
"statusCode": 500
}
shellDb.GetRows('Select * from Document where id=@id',params), 注意遵循不同数据库的语法规范
parameters 要用IDictionary<string, object> 格式的json
`{
"Id": 1,
"Name": "John Doe",
"IsVerified": true,
"Roles": [
"Admin",
"User"
],
"Profile": {
"Age": 30,
"Country": "USA"
}
}`
`An unhandled exception occurred while processing the request.
VerificationException: Method System.Linq.Enumerable.MaxInteger: type argument 'FreeSql.DatabaseModel.DbColumnInfo' violates the constraint of type parameter 'T'.
System.RuntimeMethodHandle.GetStubIfNeeded(RuntimeMethodHandleInternal method, RuntimeType declaringType, RuntimeType[] methodInstantiation)
ArgumentException: GenericArguments[0], 'FreeSql.DatabaseModel.DbColumnInfo', on 'System.Nullable1[T] MaxInteger[T](System.Collections.Generic.IEnumerable
1[System.Nullable`1[T]])' violates the constraint of type 'T'.
System.RuntimeType.ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception e)
Stack Query Cookies Headers Routing
VerificationException: Method System.Linq.Enumerable.MaxInteger: type argument 'FreeSql.DatabaseModel.DbColumnInfo' violates the constraint of type parameter 'T'.
System.RuntimeMethodHandle.GetStubIfNeeded(RuntimeMethodHandleInternal method, RuntimeType declaringType, RuntimeType[] methodInstantiation)
System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation)
Show raw exception details
ArgumentException: GenericArguments[0], 'FreeSql.DatabaseModel.DbColumnInfo', on 'System.Nullable1[T] MaxInteger[T](System.Collections.Generic.IEnumerable
1[System.Nullable1[T]])' violates the constraint of type 'T'. System.RuntimeType.ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception e) System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation) AutoMapper.Internal.TypeDetails+<>c__DisplayClass25_1.<GetPublicNoArgExtensionMethods>b__10(MethodInfo extensionMethod) System.Linq.Enumerable+WhereSelectArrayIterator<TSource, TResult>.MoveNext() System.Linq.Enumerable+ConcatIterator<TSource>.MoveNext() System.Linq.Enumerable.SelectManyIterator<TSource, TCollection, TResult>(IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector)+MoveNext() System.Linq.Enumerable+WhereSelectEnumerableIterator<TSource, TResult>.MoveNext() System.Linq.Enumerable+UnionIterator<TSource>.GetNext() System.Linq.Enumerable+UnionIterator<TSource>.MoveNext() System.Linq.Enumerable+ConcatIterator<TSource>.MoveNext() AutoMapper.Internal.TypeDetails.PossibleNames() AutoMapper.Internal.TypeDetails.GetMember(string name) AutoMapper.Configuration.Conventions.DefaultName.GetMatchingMemberInfo(TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string nameToSearch) AutoMapper.Configuration.Conventions.ParentSourceToDestinationNameMapper.GetMatchingMemberInfo(TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string nameToSearch) AutoMapper.Configuration.Conventions.DefaultMember.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, IMemberConfiguration parent, bool isReverseMap) AutoMapper.Configuration.Conventions.MemberConfiguration.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceType, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, bool isReverseMap) AutoMapper.Configuration.Conventions.NameSplitMember.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceType, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, IMemberConfiguration parent, bool isReverseMap) AutoMapper.Configuration.Conventions.MemberConfiguration.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceType, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, bool isReverseMap) AutoMapper.ProfileMap.MapDestinationPropertyToSource(TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string destMemberName, List<MemberInfo> members, bool reverseNamingConventions) AutoMapper.TypeMap..ctor(Type sourceType, Type destinationType, ProfileMap profile, bool isReverseMap) AutoMapper.ProfileMap.BuildTypeMap(IGlobalConfiguration configurationProvider, ITypeMapConfiguration config) AutoMapper.ProfileMap.Register(IGlobalConfiguration configurationProvider) AutoMapper.MapperConfiguration.Seal() AutoMapper.MapperConfiguration..ctor(MapperConfigurationExpression configurationExpression) Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions+<>c.<AddAutoMapperClasses>b__12_2(IServiceProvider sp) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider) Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions+<>c.<AddAutoMapperClasses>b__12_3(IServiceProvider sp) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider) Microsoft.Extensions.DependencyInjection.OrchardCoreBuilderExtensions+<>c.<AddDataAccess>b__0_1(IServiceProvider sp) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService<T>(IServiceProvider provider) Microsoft.Extensions.DependencyInjection.OrchardCoreBuilderExtensions+<>c+<<AddDataAccess>b__0_2>d.MoveNext() OrchardCore.Environment.Shell.Builders.ShellContextFactory.CreateDescribedContextAsync(ShellSettings settings, ShellDescriptor shellDescriptor) OrchardCore.Environment.Shell.Builders.ShellContextFactory.OrchardCore.Environment.Shell.Builders.IShellContextFactory.CreateShellContextAsync(ShellSettings settings) OrchardCore.Environment.Shell.ShellHost.GetOrCreateShellContextAsync(ShellSettings settings) OrchardCore.Environment.Shell.ShellHost.GetScopeAsync(ShellSettings settings) OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
调回net6 就没有问题
这个没跟踪到是什么原因。 应该不是版本问题吧。
program-main 执行错误。
发生异常: CLR/NatashaException
“NatashaException”类型的异常在 EasyOC.CMS.WebHost.dll 中发生,但未在用户代码中进行处理: '应输入标识符'
在 AssemblyCSharpBuilder.Add(String script)
在 NatashaInitializer.Preheating(Func`3 excludeReferencesFunc)
在 EasyOC.CMS.WebHost.Program.<>c.
Hello when I try to run the setup screen and use the EasyOC init recipe after pressing Setup I get the following error :
An unhandled exception has occurred while executing the request. OpenIddict.Abstractions.OpenIddictExceptions+ValidationException: One or more validation error(s) occurred while trying to create a new application:
The client secret cannot be null or empty for a confidential application.
Can we use the spa functionality to get through api content items and display them in kendo ui grid.
https://demos.telerik.com/aspnet-core/grid/remote-data-binding
Thanks.
Can you import content into orchard from excel files for a specific content type?
Im following this interesting project.
What is your experience with oc and this spa approach ?
Is it working out well ?
Im thinking of trying something similar using htmx with orchard core to acheive spa like functionality.
原因是: 默认过滤filterText 跟connectionConfigIdid一样。
造成 查询id ,且过滤掉 id 等于filtertext的内容
预期目标是 filterText 应该是空。
实际是跟id一致。
后台代码-对应filtertext 应该是要数据库scheme.table 而不是id:
` public async Task<IEnumerable> GetAllTablesAsync(QueryTablesDto queryTablesDto)
{
if (HttpContextAccessor.HttpContext.User.Identity.IsAuthenticated)
{
Console.WriteLine();
}
List result = await GetTablesFromCache(queryTablesDto.ConnectionConfigId, queryTablesDto.DisableCache);
if (!string.IsNullOrEmpty(queryTablesDto.FilterText))
{
queryTablesDto.FilterText = queryTablesDto.FilterText.ToLower().Replace("[", string.Empty).Replace("]", string.Empty);
}
var tables = result
.WhereIf(!string.IsNullOrEmpty(queryTablesDto.FilterText),
x => $"{x.Schema}.{x.Name}".ToLower().Contains(queryTablesDto.FilterText))
.OrderBy(x => x.Schema).ThenBy(x => x.Name)
.Take(queryTablesDto.MaxResultCount)
.Select(x => {
var mResult = new DbTableInfoDto()
{
ColumnsCount = x.Columns.Count
};
x.Columns.Clear();
mResult = _mapper.Map(x, mResult);
return mResult;
}
);
return tables;
}`
目前的内容更新方式是在前端将 ContentItem.CotentTypePart.Field.Text 这样的深度路径直接展开成直属字段
在更新内容时再根据类型定义将单级属性对象转换为ContentItem
比如 :
{
"Customer": {
"CustName": {
"Text": "Google"
}
}
}
展开为 :
{ "CustName":"Google" }
以上的操作如果对于简单类型的直接属性看起来没什么问题,但对于复杂一些的类型定义比如
{
"Customer": {
"CustName": {
"Text": "Google"
},
"Field1": {
"Text": "Value1"
}
},
"Part1": {
"Field1": {
"Text": "Value2"
}
}
}
此时将会转换为
{
"CustName": "Google",
"Field1": "Value1",
"Field1": "Value2"
}
会产生两个重复的Field1,
所以此时需要新建一个Api
{
"CustName": "Google",
"Field1": "Value1",
"Part1": {
"Field1": "Value2"
}
}
理想的方式是实现Graphql 的 mutation api ,它可以避免传输一些非必要的字段,减少网络开销
https://graphql.org/learn/queries/
问一下,感觉做的挺好的
Since orchards records are stored in the documents table in json format does freesql help in writing queries in json and return objects ?
Ive seen freesql has some json extensions but cant find examples on how to use them
I cloned project and tried to run the setup but I cannot get it to work.
I created a local repo where I changed some settings to target net 6.0 but still get a blank screen when running.
No errors in logs.
Can you try to run this clone as see if it shows the stup screen ?
https://github.com/giannik/EasyOC/tree/target-net.6.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.