Did you add entity city to DbContext?
This is caused by a bug in efcore, simple solution is to prefix your your collection with an x I did it like this:
public virtual DbSet<Clinic> XClinics { get; set; }
Clinic is an extended ou
Try escaping backslash (by double backslash)
"Server=...\sql_sauron; Database=K2Alpha; User id=sa ; password=****** ;"
Hope this helps
I have an initial Companies Creator like this
ublic class InitialCompaniesCreator
{
private readonly PhoogleDbContext _context;
public InitialCompaniesCreator(PhoogleDbContext context)
{
_context = context;
}
public void Create()
{
var defaultTenant = _context.Tenants.IgnoreQueryFilters().FirstOrDefault(t => t.TenancyName == MultiTenancy.Tenant.DefaultTenantName);
// Fysio Physics
var fysioPhysics = _context.Companies.IgnoreQueryFilters().FirstOrDefault(c => c.CompanyName == "Fysio Physics");
if (fysioPhysics == null)
{
_context.Companies.Add(
new Company
{
CompanyName = "Fysio Physics",
TenantId = defaultTenant.Id
});
_context.SaveChanges();
}
// Basic-Fit
var bf = _context.Companies.IgnoreQueryFilters().FirstOrDefault(c => c.CompanyName == "Basic-Fit");
if (bf == null)
{
_context.Companies.Add(
new Company
{
CompanyName = "Basic-Fit",
TenantId = defaultTenant.Id
});
_context.SaveChanges();
}
Which i call from the DefaultTenantBuilder.cs
public void Create()
{
CreateDefaultTenant();
new InitialCompaniesCreator(_context).Create();
new InitialClinicCreator(_context).Create();
new InitialCalendarEventCreator(_context).Create();
}
Hope this helps
Hi Guys,
After publishing my Mvc Core2 to Azure, I have trouble getting styles and scripts. In my console i get HTTP500: server error - The Server encountered an unexpected condition GET - <a class="postlink" href="http://fp-phoogle.azurewebsites.net/AbpScripts/GetScripts?v=636420979441315541">http://fp-phoogle.azurewebsites.net/Abp ... 9441315541</a>
Any tips?
Hi,
Increased memory with following command: node --max_old_space_size=16384 (./node_modules/.bin/ng build --prod)
C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host> node --max_old_space_size=16384 (./node_modules/.bin/ng build --prod) 24% building modules 123/123 modules 0 activeTemplate parse warnings: The <template> element is deprecated. Use <ng-template> instead (" [WARNING ->]<template [ngIf]="!isClosed">
==== JS stack trace =========================================
Security context: 0000016A7C53FA99 <JS Object> 1: DoJoin(aka DoJoin) [native array.js:~129] [pc=00000392D3C46E52] (this=0000016A7C504241 0589 <JS Array[260]>,x=260,N=0000016A7C504281 <true>,J=0000016A7C593339 <String[1]: \n>,I=000 ConvertToString (SharedFunctionInfo 0000016A7C55DBC9)>) 2: Join(aka Join) [native array.js:180] [pc=00000392C9183FF2] (this=0000016A7C504241 <unde
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory PS C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host>
I finally migrated my ASP.NET 5.x & Angularjs 1.x to ASP.NET CORE & Angular and it is working on my machine ;-) When i try to publish it to Azure (merge project) from Visual Studio I'm getting an error:
The command "ng build --prod" exited with code 9009. PhoogleZero.Web.Host C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host\PhoogleZero.Web.Host.csproj 76
Any instructions or tips how to publish to Azure?
I have it working on port 44390 in Azure
<rewrite>
<rules>
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
Hope this helps
Hi in AngularJS spa I have a large organizationtree, when selecting a unit in the bottom half of the tree the members portlet is on top of the page.
Need css advice to keep the members portlet visible
Thanks in advance