Base solution for your next web application

Activities of "tteoh"

<cite>drcgreece: </cite> Hi Ismail, I ended up with this functional code, in case someone else needs it:

public async Task<DataTable> GetPocPivotQueueAsync(int? tenantId, string filter)
       {
           return await Task.Run(() =>
           {
               return GetPocPivotQueue(tenantId, filter);
           });
       }

       public DataTable GetPocPivotQueue(int? tenantId, string filter)
       {
           // creates resulting Queue
           var result = new DataTable();

           SqlCommand cmd = null;
           try
           {
               // prepare command
               cmd = new SqlCommand("[dbo].[sp_GetPocInPivot]", (SqlConnection)this.Context.Database.Connection);
               cmd.CommandType = CommandType.StoredProcedure;
               cmd.Parameters.AddWithValue("@TenantId", tenantId.HasValue ? tenantId.Value : (object)DBNull.Value);
               cmd.Parameters.AddWithValue("@Filter", string.IsNullOrEmpty(filter) ? (object)DBNull.Value : filter);

               // Use DataTables to extract the whole table in one hit
               using (SqlDataAdapter da = new SqlDataAdapter(cmd))
               {
                   // fill the datatable
                   da.Fill(result);
               }
           }
           finally
           {
               if (cmd != null)
               {
                   // close command
                   cmd.Dispose();
               }
           }

           return result;
       }

Hi, would you able to provide more details on the actual implementation?

Are you using Custom Repository or EF Integration-Custom Repository methods?

Thanks. /tommy

<cite>ismcagdas: </cite> Hi,

We are not planning to implement this feature in short term. Since this is a common concept of software development, you can find more info and sample implementations on the internet. You can also check Entity Framework's github repository as well.

Thanks.

Hi Support,

Thank you for the confirmation above.

May I know which method I should use:

  1. Custom Repository
  2. Entity Framework Integration - Custom Repository

Hope to get some pointers as I am still learning to developer using Abp framework and the amount of learning is little overwhelming for me right now and I m short of time.

Thanks, /tommy

Answer

Hi Support,

Gratitude for the confirmation and you just checked out one of my task list for today.

Thank you so much! /tommy

<cite>tteoh: </cite>

<cite>ismcagdas: </cite> Hi,

In AspNet Zero, we handled it in this way.

  1. We return the values in UTC to client.
  2. We use <a class="postlink" href="https://momentjs.com/timezone/">https://momentjs.com/timezone/</a> library and set the timezone with user's current timezone setting. You can reach it using "abp.timing.timeZoneInfo.iana.timeZoneId" on the client side.
  3. Then you can use momentjs to format your dates and it will show dates in the specific time zone.

Please write back if you have a different requirement.

Thanks.

Hi Ismail,

Even the default implemented Clock.Provider is set to "Local"? AspNet Zero will first convert the date/time stored in DB in Local to UTC before returning the data to Client side?

Thanks. p/s: Sincere apology if i got your name wrong.

Hi,

With reference to question above, i believe the answer is "No". Correct?

After spending my weekends to step through the program in debug mode and writing to console.log in browser, my understanding is below:

  1. At Application_Start, by setting Clock.Provider = ClockProviders.local OR remove existing setting to UTC, the appliction will run with Unspecified provider. This also means the system is not running with Multiple Timezone: [Yes | No]?
  2. Inherently, the Timezone setting for Application and Users are disabled [Yes | No]?
  3. Abp will save date/time value as-is from browser to database and vice versa [Yes | No]?

Thanks. /Tommy

<cite>ismcagdas: </cite> Hi,

If you need some piece of code in more than app service, it is a good candidate for a domain service. In your case, you can move this code in a domain service and domain services are UOW by default. Maybe this doc can guide you better <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Domain-Services">http://aspnetboilerplate.com/Pages/Docu ... n-Services</a>.

Dear Support,

Please refer to this link: #2567@d519ab56-ce8e-4c12-8639-3586c191cdc6

It was mentioned that Domain Service is NOT UoW by default unlike what being mentioned above.

Appreciate your clarification once again.

Thanks. /tommy

<cite>pkut: </cite> Hi,

Yes, we querying database first, but sometimes it's not enough and insert attempt fail on database constraint. So creating inner unit of work seems to be a solution, but - as far as I remember, documentation says that inner UOW uses the same connection and other DB related stuff as outer UOW. Looks like my understanding is a bit wrong here, please explain the details of how inner UOW works and how can I be sure that we have new DbContext.

Best regards Pavel

Hi Support,

I have the same understanding as Pavel. Could you please kindly clarify his question on inner UoW.

Thanks. /tommy

Dear Support,

My current project is hinging on the numbering module to generate Transaction/Document No.

Really appreciate your advice on where to implement "EF optimistic concurrency" that is aligned to abp framework.

Thanks. /Tommy

Hi Ahmed,

The DLL source codes can be found at GitHub. It's either part of aspboilerplate or module-zero.

Good luck.

Regards, /tommy

<cite>drcgreece: </cite> Hi Tommy, thanks for the feedback.

My aim is to be understand how the framework works from A to Z. I have been working with the framework for 1 month now, I still feel I miss so many details and this gives an uncomfortable feeling, as with every change I want to introduce or anything to add I am always worried I will break something.

So my idea is that if I understand how everything is registered, how components communicate, then things will be easy.

Do you have a pattern or way of going through the framework details and learning it?

Thanks

Hi Bilal,

It is great to know that I m not learning alone. :D

Check out the abp documentation, it describes on WHAT the platform is made of. As for HOW the platform is built, it offers very little details.

For example, I had to figure out that certain implementation of AspNet Zero were part of module-zero when I failed to locate them in the boilderplate source codes.

I started with the same thought as you but then I realize it is just not possible to learn the whole framework then only to start customization. As for implementation, I would take aspnet zero as the basis of customization. Therefore, it is expected that any future release of this template will not warrant automatic upgrade of base codes. But I m fine with this approach.

For example, I have changed the current Email Confirmation workflow to include Account activation by inserting the codes at the specific section of existing project code files with proper comments. Probably not the best way but fatest way.

Back to the HOW part, I can kind of comprehend your concerns. For example, UnitOfWork in ABP, given the online documentation, I am still puzzled how it actually works. Especially, how it is being applied in AspNet Zero template. I m sure would have shortened the learning curve using the template as reference.

Perhaps, having a "class diagram", may help to paint the big picture. Something beyond my knowledge in OOP.

Good luck! /tommy

Hi Bilal,

AspNet Zero: <a class="postlink" href="https://www.aspnetzero.com/Documents/Development-Guide-Mvc-Angularjs">https://www.aspnetzero.com/Documents/De ... -Angularjs</a> <a class="postlink" href="https://www.aspnetzero.com/Documents/Developing-Step-By-Step-Mvc-Angularjs">https://www.aspnetzero.com/Documents/De ... -Angularjs</a>

AspNet Zero is built on top of AspBoilderplate. Therefore, a lot of under the hood details are documented here: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents">http://www.aspnetboilerplate.com/Pages/Documents</a>

One thing when debugging AspNet Zero, you can't step in ABP codes. You have to download them from GitHub or search in GitHub.

Lastly, AspNet Zero also sits on top of another component: "module-zero", which can be found in GitHub.

The journal of discovery continues... ;o)

/Tommy

Showing 141 to 150 of 163 entries