Aktivity „mc86“

Odpoveď

In ABP SUITE "Server.Entity.Entity.txt" TEMPLATE

   public %%entity-name%%(%%primary-key%% id, %**%constructor-parameters%%**)
        {
            Id = id;
%%constructor-parameters-with-values%%
        }

IF Entity has NavigationProperties and optional parameters, NavigationPropertie's primary key is at the end of parameters then get this error."CS1737: Optional parameters must appear after all required parameters."

Odpoveď

abp suite in Load Entity From Database page ,get errors when connecting to database (approximate 2000 tables in the database) test connect is fine

非常感谢

@mailming 谢谢 筛选器已经可以使用了 但是有个问题 DataSourceLoadOptionsBase 中有2个属性都是SummaryInfo 类型的 用转换器的话只能添加一个类型, SummaryInfo a; SummaryInfo b; ulr只能像这样 “xxx/xxxx/a=[SummaryInfo ]”或者 “xxx/xxxx/a=[SummaryInfo ]” 有办法把在转换事件中获取属性名称吗?或者更改下转换器 在调用时将属性名称传入 或者接受自定义?


另外 如果我把API 更改成POST方法 是否可以把DataSourceLoadOptionsBase 直接传递给接口?

hi maliming 增加转换器后

Configure<AbpHttpClientProxyingOptions>(options => { options.QueryStringConverts.Add(typeof(DataSourceLoadOptionsBase), typeof(DataSourceLoadOptionsBaseToQueryString)); options.QueryStringConverts.Add(typeof(SummaryInfo[]), typeof(DataSourceLoadOptionsBaseSummaryInfoToQueryString)); });

DataSourceLoadOptionsBase 不会进行转换 但是SummaryInfo 可以 为什么?

Yes.

problem is that the method doesn't work. I can get data from my api but if this method is working then the blazor client should request a URL like HTTP://remotehost/action?123445678.

public class DataSourceLoadOptionsBaseToQueryString : IObjectToQueryString, ITransientDependency
    {
        public Task ConvertAsync(DataSourceLoadOptionsBase values)
        {
            if (values==null)
            {
                return null;
            }

          
            return Task.FromResult("12345678");
        }
    }

i set a Breakpoint in the method but it was not hitted

///////////////////////////////////////////////////////////////////// //url should like this at the end. ?requireTotalCount=true&take=10&totalSummary=[{"Selector":"SendTime","SummaryType":"count"}]

but //now the httpclient get the wrong url. ?requireTotalCount=true&take=10&totalSummary=Devextrem.asp.net.summaryinfo

so I want to use QueryStringConverts to fix that.

My Microservice project is created in v5.0 rc and I just updated it to v5.0 and just add one entity to it。

I will creat Microservice project to test it.

HI maliming

it doesn't work.

got it after I try it, I will send feedback.

main folder

services apps

Zobrazených 51 až 60 z 70 záznamov
Made with ❤️ on ABP v8.2.0-preview Updated on marca 25, 2024, 15:11