<cite>Jonas452: </cite> As one must continue it's development i have defined a navigation property on my model. Something i really didn't want to do.
modelBuilder.Entity<Person>().Property(p => p.PUserAccount_Id).IsOptional().HasColumnName("PUserAccount_Id"); modelBuilder.Entity<Person>().HasOptional(p => p.PUserAccount).WithMany().HasForeignKey(pers => pers.PUserAccount_Id);
But hey, what can you do... If someone finds a better solution for this in the future, i'd love to hear it.
@ ismcagdas - Thx for the link ;)
@Jonas452 - Would you mind sharing the specifics on how you resolved this error? I am getting the exact same error message on several of my entities. I do not use the "ForeignKey" annotation in my models. Also, where you do place the modelBuilder.Entity code you are showing above, I cannot find it anywhere in the solution?
I completed the upgrade to version 2.0.2 and now I'm running into errors in my app. I posted details here: #3023@d2485843-c543-4ba2-bf4a-9f0c4d7ddf8b
I updated to ABP version 2.0.2 today and now several of my entity index views are breaking. The logs are showing the error below.
ERROR 2017-04-26 19:15:22,660 [10 ] nHandling.AbpApiExceptionFilterAttribute - An error occurred while preparing the command definition. See the inner exception for details.
System.Data.Entity.Core.EntityCommandCompilationException: An error occurred while preparing the command definition. See the inner exception for details. ---> System.ApplicationException: FK Constriant not found for association 'EXLNT.NursingOps17.EntityFramework.FundingSource_Company' - must directly specify foreign keys on model to be able to apply this filter
Do I need to downgrade my version of EntityFramework.DynamicFilters to 1.6?
I just did the upgrade to ABP 2.0.1 and am facing a serious issue. I cannot login to my tenant with any user Id. I cannot even login to my tenant via the host tenant. Soon as you click on the "log into tenant" from the Tenant grid it throws an error.
It also does not show any users from my tenant instance either.
I checked my error log and it shows the same cryptography error shown in this thread.
Will the update being published tomorrow address this issue?
I have posted my own thread on upgrade issues here: #3023
In the web.config of your .Web project you will find the two entries below. You need to update these with the keys provided by Google for your domain.
<add key="recaptchaPublicKey" value="Your Public Key Value goes here" />
<add key="recaptchaPrivateKey" value="Your Private Key value goes here" />
<add key="recaptchaApiVersion" value="2" />
Login to your Google account and then goto <a class="postlink" href="https://www.google.com/recaptcha/">https://www.google.com/recaptcha/</a> to generate your domain keys.
I am not using a controller or method for my page. I am also using the ABP supplied modal. I only customized the JS file.
In your EF project, there is a class named MyProjectDbContext.cs, you will find the code shown below. Each time you add new entities, you need to add one line of code as shown.
public class MyProjectNameDbContext : AbpZeroDbContext<Tenant, Role, User>
{
/* Define an IDbSet for each entity of the application */
public virtual IDbSet<BinaryObject> BinaryObjects { get; set; }
public virtual IDbSet<Friendship> Friendships { get; set; }
public virtual IDbSet<ChatMessage> ChatMessages { get; set; }
//20161103 - Added for My Proj
public virtual IDbSet<MyEntity> MyTable { get; set; }
To get the custom seed classes to run you need to update the method, shown below, in EF project. This method is in the Configuration.cs class in the "migrations" folder.
protected override void Seed(EntityFramework.MyProjectDbContext context)
{
///Code removed for simplicity
//You add this line:
new AddressRelated(context).Create();
}
AddressRelated is my seed data class, where I load tables like Country and State.
You are showing me C# code.
I need it available in the ChangePictureModal.js file, where I make the app service call.