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.
Can you mark the Location entity with a MultitenancySide.Host attribute: [MultiTenancySide(MultiTenancySides.Host)]? Not sure if you use both in one query if it still applies the filter to each table.
You might be pushing the limits of the Filtering technique they are using with EF.
Ok, I am getting back to work now :)
As I said in my other post, you will never avoid changing some code within the Framework code. You can try, but it's impossible not to. Just try and have a good merging strategy in place.
If you look for my post on the github link above (jmhinnen), I explain how I do the branching and merging. Works great for me!
We do this in ours. It would take me a bit of time to document everything but this is very doable. In every project, I have a Module and a CustomDtoMapper class at the root. I took this from the framework's Application project. I like this so I use that same thing when I create my own project.
In our Core project, we implemented our own Authorization provider (inherit from AuthorizationProvider just like theirs does) and in that projects Module, just call Configuration.Authorization.Providers.Add<MyAuthorizationProvider>();
Make your Modules dependent on their module. As an example, in your Core project's Module, add a DependsOn for the frameworks Core module. Make sense?
You will need to wire up the API parsing inside the WebAPI project. This is the big one that converts the AppServices to WebAPI methods. Search for DynamicApiControllerBuilder and you can see where they registered their Application Module. You will need to add a DependsOn your Application module here also.
Configuration.Modules.AbpWebApi().DynamicApiControllerBuilder
.ForAll<IApplicationService>(typeof(MyApplicationModule).Assembly, "app")
.Build();
Not sure you can get away with Multiple EF projects. Just keep that as one. Unless you had separate DbContext classes, I don't see how this would help a ton. I move all their Migrations into a sub folder in the Migrations folder to keep their migrations separate from mine. This helps to keep things separate on the EF side. Other than that, never had any issues with this approach.
We also have our own SettingsProvider. We register that in the Web Module. As you go, it's pretty easy to figure out what they did to copy. I will say that we can keep from changing the framework stuff about 90% of the time. Sometimes it's impossible to avoid changing the framework code.
Hope that helps a little. If you just start to create your own Application and Core project, you will figure it out pretty quick.
Just FYI, this no longer works because the AccountController login method no longer call SignInAsync in the account controller.
<a class="postlink" href="https://gist.github.com/hikalkan/67469e05475c2d18cb88">https://gist.github.com/hikalkan/67469e05475c2d18cb88</a>
I updated this with a question. Just making sure no one missed the question.
Thanks!
Rashed is completely correct! There are lots of good CMS systems out there. I use this framework because it is NOT a CMS! I think if you needed CMS functionality for say a blog or something like that, then this is a good place for an aspnetzero_contrib project where users could share different examples of implementations on top of AspNetZero. But keep in mind, there are already 3 different front ends of AspNetZero (Jquery, Angular, Angular2), and hopefully more coming :)
I would rather see many more implementations with different front ends, a React version, React / Redux version, Aurelia version. Give developers more choices on the front end instead of bulking up the back end. Keep the framework just a framework! I think doing this type of stuff and maintaining a CMS type system would be very difficult.
As always, this is my opinion! It's good to be able to openly discuss this stuff.
I don't think this is a problem with the framework.
<a class="postlink" href="http://stackoverflow.com/questions/17127351/introducing-foreign-key-constraint-may-cause-cycles-or-multiple-cascade-paths">http://stackoverflow.com/questions/1712 ... cade-paths</a>
We have seen this using the default cascade option in EF a ton. That article explains the error some.
Hope that helps.