Skip to content

Instantly share code, notes, and snippets.

@ebicoglu
Created January 22, 2021 11:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebicoglu/24962c9e4a853a38fee9411ebd729237 to your computer and use it in GitHub Desktop.
Save ebicoglu/24962c9e4a853a38fee9411ebd729237 to your computer and use it in GitHub Desktop.
AppUser
public class AppUser : FullAuditedAggregateRoot<Guid>, IUser
{
#region Base properties
/* These properties are shared with the IdentityUser entity of the Identity module.
* Do not change these properties through this class. Instead, use Identity module
* services (like IdentityUserManager) to change them.
* So, this properties are designed as read only!
*/
public virtual Guid? TenantId { get; private set; }
public virtual string UserName { get; private set; }
public virtual string Name { get; private set; }
public virtual string Surname { get; private set; }
public virtual string Email { get; private set; }
public virtual bool EmailConfirmed { get; private set; }
public virtual string PhoneNumber { get; private set; }
public virtual bool PhoneNumberConfirmed { get; private set; }
#endregion
/* Add your own properties here. Example:
*
* public virtual string MyProperty { get; set; }
* public string MyProperty { get; set; }
*
* If you add a property and using the EF Core, remember these;
*
* 1. update EfCoreNonTierPublic01212715DbContext.OnModelCreating
* to configure the mapping for your new property
* 2. Update EfCoreNonTierPublic01212715EfCoreEntityExtensionMappings to extend the IdentityUser entity
* and add your new property to the migration.
* 3. Use the Add-Migration to add a new database migration.
* 4. Run the .DbMigrator project (or use the Update-Database command) to apply
* schema change to the database.
*/
private AppUser()
{
}
}
@rushasdev
Copy link

rushasdev commented Jan 25, 2023

Hi, with abp 7 you get the following error: 'AppUser' does not implement interface member 'IUser.IsActive' . Adding public virtual bool IsActive { get; private set; } clears the error. Is this the right way to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment