Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ivanosw1"

I use AspNet Core version 3.2.0.0

Hi, I have many modules that inherit from ApplicationService and Swagger shows all the methods correctly with parameters, dto and so on. I've added a new file in order to manage files upload, inheriting from AbpController; the methods works but aren't showed by Swagger . I've noted that also yours controller methods like UploadProfilePicture is not showed. There is some settings to view also the AbpController methods in Swagger ?

Thanks

Ok, great. Thank you alirizaadiyahsi.

Hi, I haven't yet received response to my question, but after many days of real work on framework, I think that your answer This is not the expected behaviour. means a different thing that I supposed.

Further test with Host and Tenant data, seems to confirm that every query against Host data is always executed on initial Host database and never against remote databases.

Can you kindly confirm that ?

Hi, I don't figure out why I can get the displayname if I use AutoMap, but not if I do the same thing manually. Where is the magic ?

public class MyPermissionDto { public string DisplayName { get; set; }

}  

.....

var permissions = PermissionManager.GetAllPermissions(); var resultz = new List<MyPermissionDto>(); foreach (var rootPermission in permissions) { var flatPermission = rootPermission.MapTo<MyPermissionDto>(); resultz.Add(flatPermission); string thisWorks = flatPermission.DisplayName; string thisNotWorks = rootPermission.DisplayName }

I try to explain better because I don't know if is an ABP related behaviour. The scenario is very simple: ABP Clock provider is Unspecified as default. My application doesn't manage any timezone because is used only in the same region. The client is Angular2 and there are 2 methods on application service: one GET and one POST. The DTO is the same with two fields: Id (int) and StartDate (DateTime). Supposed that 'new Date()' is Thu Apr 20 2017 08:52:50 GMT+0200 (ora legale Europa occidentale), the StartDate sent over internet is "2017-04-20T06:52:50.324Z" serialized by JSON.stringify(). On the server side the GET method deserialize correctly in 2017-04-20 08:52:50, while the POST method deserialize in 2017-04-20 06:52:50. It seems the the ISO format is threated differently.

So, the question is: which is the correct way to deserialize the client dates? There is some example explanatory? Thanks Ivano

I don't use UtcClockProvider. My goal is simply to write and read data exactly how client sent to server by an angular2 app.

<a class="postlink" href="http://.../api/services/app/api/getvalues?id=1&StartDate=2017-04-17T22%3A00%3A00.000Z">http://.../api/services/app/api/getvalu ... %3A00.000Z</a> If method receive the dto by querystring, startdate is correctly parsed in 2017-04-18 00:00:00 (Italian time zone) If method receive the dto by post, startdate is the same as input, 2017-04-17 22:00:00.

We are planning to move from local to azure server and we are investigating how deal correctly with date and time.

Thanks

Hi, I have a simple dto input with public int Id {get;set;} public DateTime StartDate {get;set;}

In my angular2 client app I use moment to populate the StartDate with moment(); In server side if the method is Get the date in converted to server time (as you do in GetAuditLogs), but if method si Post the date is parsed as is without consider the time zone and so I have different values.

How Can I use correctly moment and server side datetime management ? I don't need timezone.

Thank you.

This is the code. A simple list of items shared between host and tenant. Tenant is on separated database. I would like to manage only one host list for every tenant either local or separate. Host and Tenant 1 on DB1 Tenant2 on DB2

// This call is authenticated as Tenant2 and host items are retrived from host table in DB2.

var dtos = new List<DossierStateTypeDto>();

        // Host 
        using (CurrentUnitOfWork.SetTenantId(null)) 
        {
            var hostItems = await dossierStateTypeRepository.GetAllListAsync();
            dtos.AddRange(hostItems.MapTo&lt;List&lt;DossierStateTypeDto&gt;>());
        }

        // Tenant
        var tenantItems = await dossierStateTypeRepository.GetAllListAsync();
        dtos.AddRange(tenantItems.MapTo&lt;List&lt;DossierStateTypeDto&gt;>());

        var result = new ListResultDto&lt;DossierStateTypeDto&gt;(dtos);
        return result;

Thanks, Ivano

Hi, I've a table with IMayHaveTenantId created with some host data. In code I need to get all Host's data plus Tenant's data. This is a simple step: for host query inside a using (unitOfWorkManager.Current.SetTenantId(null)) and after this query for tenant. So far so good.

The problem is when I configure a new Tenant in a second database. When I query for host's data the query is executed against the second database and not where I guess, in the first created host database. This behaviour forces me to duplicate host data for every separated tenant database (and keep them in sync). There is a workaround in order to have only a single source of host's data ?

Thank you. Ivano

Showing 161 to 170 of 178 entries