Base solution for your next web application

Activities of "elmogallen"

We just purchased ASP.NET Zero to rewrite an internal application. Your documentation is great, and we've been able to add some simple pages in no time at all!

However, all our data already exists in SQL Server, and is touched by multiple teams, so we can't really use Code First, and I have not seen any documentation on what the best practices are for accessing that in the ASP.NET Zero world. Can you help?

Thanks, Dave

Question

How do I map the ABP users/roles to users/roles from Active Directory? I don't understand how it works. Can someone explain?

I found some documentation for ASP.NET Boilerplate, but it looks like that might already be done in ASP.NET Zero. I also looked at the docs for ASP.NET Zero, but it was fairly short, and didn't tell me how to do things like add users once I switched to LDAP...

Thanks in advance, Dave Haynes

When I tried this, though, ABP wants to automatically add the "Id" field to my existing table, and then it wants to run the database migrations, which I don't want to do...

Dave

Thank you for your response. I really appreciate it because there are things I'm not understanding.

I have done this:

public class DealerKioskSetting : Entity
    {
        [Column("DealerKioskId")]
        public override int Id { get; set; }

        //[Key]
        //public int DealerKioskId { get; set; }

and when I do that, I get the following in my JSON data (from the console):

..."dealerKioskId":0, "id":1234...

So, my question now is... why is dealerKioskId showing up there at all? The id value is the correct dealerKioskId in this example.

Thank you, Dave

Or, are you saying I should override Id and keep DealerKioskId as well?

Should I also remove DealerKioskId from my DealerKioskSettingsListDto ? Do I need to override Id there or do anything, or will it just be handled correctly at that point?

Thanks, Dave

Question

I'm having a hard time understanding how to use Bootstrap Select in my SPA ASP.NET Zero application. Can you give an example?

This is not working:

<select name="repeatSelect" id="repeatSelect" ng-model="vm.coupon.promotionId" class="selectpicker">
    <option ng-repeat="option in vm.promotions" value="{{option.id}}">{{option.name}}</option>
</select>

Do I need to do anything else?

Thanks, Dave

Answer

Also, as a follow-up question. How can I integrate Bootstrap Select if I have an older version of ASPNetZero before it was available. I can't quite figure out what all I need to do because there have been so many changes. I tried upgrading, but it didn't go smoothly.

Dave

Answer

So I've been goofing around and I was able to add Bootstrap Select, following the same pattern as Bootstrap Switch, then I added the js and css to the AppBundleConfig and used the syntax shown on another post here to add the ui-jq="selectpicker" attribute to my <select>.

So, I got it showing up and that's all good, except now it only seems to work if my options are static. If I try to get them using the angular model, I'm thinking that it is trying to convert it to the selectpicker before it has the data available.

<select id="PromotionId" name="PromotionId" class="form-control" ui-jq="selectpicker" data-live-search="true" ng-model="vm.coupon.promotionId" required uib-popover="Must be setup in the Credit Buy Down system first." popover-title="Promotion" popover-placement="right" popover-trigger="mouseenter" popover-append-to-body="true">
    <option ng-repeat="option in vm.promotions" value="{{option.id}}">{{option.name}}</option>
</select>

... in the js: ...
                couponMaintenanceService.getPromotions().success(function (result)
                {
                    console.log("success");
                    vm.promotions = result.items;
                });

How can I tell the selectpicker to update itself?

Answer

That worked perfectly. I didn't realize I could just call arbitrary jquery. I thought I had to use angular directives or something.

Thanks! Dave

Showing 1 to 10 of 14 entries