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,
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 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
So I have created a new AppPermission Pages_Administration_Users_List
In UserAppService can i combine class permissions and method permissions?
[AbpAuthorize(AppPermissions.Pages_Administration_Users)]
public class UserAppService : PhoogleZeroAppServiceBase, IUserAppService
and then in method GetBirthdayList
[AbpAuthorize(AppPermissions.Pages_Administration_Users_List)]
public async Task<ListResultDto<UserListDto>> GetBirthDayList()
{
var query = from u in UserManager.Users.Where(u => u.IsActive)
let diffYears = DbFunctions.DiffYears(u.DateOfBirth, DateTime.Today)
let birthdayOccurred =
u.DateOfBirth.Month < DateTime.Today.Month
|| ((u.DateOfBirth.Day + 3) <= DateTime.Today.Day && u.DateOfBirth.Month == DateTime.Today.Month)
let nextBirthdate = DbFunctions.AddYears(u.DateOfBirth, diffYears + (birthdayOccurred ? 1 : 0))
let daysToBirthdate = DbFunctions.DiffDays(DateTime.Today, nextBirthdate)
orderby daysToBirthdate
select u;
var users = await query.Take(12).ToListAsync();
return new ListResultDto<UserListDto>(users.MapTo<List<UserListDto>>());
}
@gconey, Great! Thanks a lot!
OOps , forget it. This works
private readonly IRepository<]My]OrganizationUnit, long> _organizationUnitRepository;