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

Activities of "JeffMH"

For Azure, create a blank database first through the Portal.

Then, inside the AspNetZero solution, under tools, there is a Migrator project. Change the connection string within that project to point to your Azure DB, run it.

Hope that helps a little.

Ok, I figured it out. In the UserManager class within the Core project, override the CreateIdentityAsync method. You can add your claim in here. SignInManager calls this function. I will update the GitHub link.

public override async Task<ClaimsIdentity> CreateIdentityAsync(User user, string authenticationType)
{
    var identity = await base.CreateIdentityAsync(user, authenticationType);

    //- Custom claim here
    identity.AddClaim(new Claim("MyCustomClaim", "ClaimValue"));

    return identity;
}

And by the way, sorry to keep harping on this @drcgreece, this is one of those places where the pros / cons of not changing their code is a tough one. You can either modify the class they gave you, or you have to Implement your own UserManager that inherits from theirs, and within the IOC config, you can change how the IUserManager interface is created. To me, it's just a little more than I want to do. Your mileage may very.

Sorry, I don't mean to sound so repetitive, I just thought this was a good example of how the lines get blurred as you go.

That's ok. This should work the same in TFS. You can Merge down in TFS without ever merging "up".

So if you create the very root branch from the Zip file downloaded (absolutely no changes). Then immediately after you commit that, branch to "Framework".

Then, each time you get a new ZipFile from AspNetZero site, you just go to the Framework Branch, and unzip the file. in GIT, I delete everything, then unzip it. That way if they have deleted any files, I get that also. in TFS, this may be the only complication. You may need to do the following:

  1. Go to Explorer in the Framework Branch.
  2. Delete everything (do not checkout from TFS yet).
  3. Unzip everything.
  4. Run TFS command line to pend changes. I would have to remember how to do this.

Then, check in. Once that's done, you merge back to your Master branch. NEVER merge into the framework branch. Framework branch is always just the contents of the ZipFile. Then, when you merge, you should see conflicts where things have changed. Just a normal code merge at that point. Something you can undo, and rollback.

I will find the commands for #4 tomorrow. I have a batch file in my old code somewhere that does it.

I feel like I need to make a video explaining how I am doing the merging. I see these steps and I cringe. I am just not sure I have the time to do that.

Read my post on GitHub again. I can't say how strongly I believe you have to use your source control's merging capabilities. You ask which files have changed, I know that because my source control system tells me what changed. It already knows how to merge files and helps you make those decisions. You have to take advantage of that system in my opinion. I am probably 3 or 4 versions behind, but merging would take me probably just a few hours at most. I think I could get it done within a day for sure (minus testing time).

Sorry if I sound overly opinionated on this subject. I just believe your experience would be so much better doing it this way. I will hop off my soap box now.

Any quick hints for this? I am about to have to really tear apart some of the code, and it's going to take quite a bit of time. I was hopeful someone had an "oh that's easy" answer.

<cite>ismcagdas: </cite> Hi,

I have deleted your last post in this topic because sharing source code here is against license rules. Can you also delete files from dropbox as well ?

Please share only your DbContext class's content here or you can send the whole project via email.

Thanks.

Sorry as well. I didn't realize that when I asked him to post it.

Not sure what your goal is on the EF side. Maybe post the project you are trying to code and someone can help.

Also, I have never had to implement AutoRepositoryTypes within AspNetZero. Not sure what that attribute is for. Someone else might need to chime in here and explain that one.

My suggestion is do the AspNetZero walk through, and maybe avoid looking at anything on the Boilerplate side to learn AspNetZero. Maybe that's causing some confusion.

You don't need BlogTenant, BlogRole, BlogUser in AspNetZero. Remember, Hikalkan implemented that example on top of Boilerplate, not AspNetZero. AspNetZero already implements those items with the User and Role objects. Remember, AspNetZero is an implementation of Boilerplate, so it's a best practice implementation of that Idea. So, you just have to keep that in mind when you see examples on Boilerplate.

So let's take this from his example:

[Table("BlgPosts")]
    public class Post : FullAuditedEntity<int, BlogUser>
    {
        public const int MaxTitleLength = 128;

In AspNetZero, you need to inherit just from FullAuditedEntity. Don't reference BlogUser.

<a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step">https://aspnetzero.com/Documents/Develo ... ep-By-Step</a> (Pick your flavor from list)

That step by step guide shows this when it talks about creating the People entity.

Hope that points you in the right direction.

We are in our 3rd product with it so just getting more familiar as we go! I am a quiet behind the scenes guy. Unfortunately no blogs about it. I am a part owner of a consulting firm, so spend most my hours coding and managing clients. Just like to help out where i can. I like the framework also so I like to hop on sometime and answer questions if I can. I really want to see the framework do good. When I first saw it I thought it was a heck of an idea.

<a class="postlink" href="https://github.com/jcachat/EntityFramework.DynamicFilters">https://github.com/jcachat/EntityFramew ... micFilters</a>

This is the library they use to do the filtering. It's not baked into EF.

Showing 31 to 40 of 66 entries