Base solution for your next web application

Activities of "josus"

Hello,

As new aspnetzero customers we are starting to see how to fit our new product into the framework. One of our goals is to create new entities related to OU, so, we will have Employees, Customers, Projects and other entities related to one or more OU. Do you think:

1.- Is this a good idea, or maybe we can "clone" OU as a new entity and work with it? 2.- If you think it is a good idea, can you teach us where to start?

Thanks in advance.

Great!!!

I was looking only into the aspnetzero docs and I wasn't able to find any info about my requirement. I think a need to read a lot before start.

Thank you very much!!

Hi all,

I am using angular file saver to download a file from the server. My Application Service creates an image on the fly and return a byte array from a memory stream. On the client side, the data is received as string. The file saver get the data with a Blob object and it save the file to disk. But, when I try to open it it is wrong.

Can you provide some code sample with the correct way to do this? Is the ApplicationService the correct place to do it? I am using mvc5/angularjs version of aspnetzero.

Thanks in advance.

Josus

I saw it, but it is done in a MVC controller and the return type is a FileResult. I need to return the image data, something like a byte array from an ApplicationService, where no reference to System.Web.Mvc is needed. Any other option to make it work?

I answer myself:

My ApplicationService now returns a Dto with a byte[] for the image data and other additional properties. When this Dto is serialized as Json string the byte[] is converted to a Base64 string.

In my controler I used this;

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from

to convert back this Base64 string to a javascript byte array that is the source for a Blob passed to FileSaver module. And it works!!

The final client code looks like this:

                employeeService.getEmployeeCard(employee.id)
                    .then(function (result) {
                        var bytes = Uint8Array.from(atob(result.data.image), c => c.charCodeAt(0));
                        var data = new Blob([bytes], { type: 'image/jpeg' });
                        fileSaver.saveAs(data, result.data.employeeName + '.jpeg');
                    });

Regards!

Hello again,

I am having a problem when I try to add a DBGeography property in a Model class. When I try to create the migration I receive this error:

Spatial types and functions are not available for this provider because the assembly ‘Microsoft.SqlServer.Types’ version 10 or higher could not be found.

I installed the nuget v14 in both, EntityFramework and Core projects with the same result. Migration is not created.

I have been working with spatial types in other projects without ABP without this issue. How can I solve it? It is mandatory for my project to work with Spatial Types.

Thanks in advance.

6.x

Yes, I tried, it works on projects without ABP but, I don't know why, it doesn't work on ABP projects. As I saw in my first question, I tried to install the nuget in all the projects, include the Test project!!! and the result is always the same. I am unable to generate the migration.

Hi again,

I have SQL Server Developper edition installed on my dev machine. I also installed the SQLSysClrTypes.msi as described in the Microsoft page and the problem is still happening.

Hi,

I read the docs about Timing but I don't know how it works. I want to have all DateTimes in Database in UTC. When a Backend User or API call is done, the dates will be in LocalTime and then, translated to UTC. Same behavior when a backend user o API call gets dates from the application. My first question is, what is LocalTime? then Tenant Setting for TimeZone or the user computer timezone? what about the API clients?

My ClockProvider is set to Utc, I have an API endpoint that creates records using Clock.Now. It is saved ok to Database with UTC value. But when I get these records the DateTimes fields are not translated to the Tenant TimeZone.

Showing 1 to 10 of 25 entries