tag:blogger.com,1999:blog-8525160902548525190.post6499806684949679253..comments2024-03-24T18:10:47.864+11:00Comments on Murtaza Dhari's blog: .Net Core Entity Framework Seperate Entity and Mapping ClassMurtaza Dharihttp://www.blogger.com/profile/06979316081987345692noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8525160902548525190.post-91013929198424163362017-05-14T15:40:10.731+10:002017-05-14T15:40:10.731+10:00Broooo, Your class ApplicationUser inherits from I...Broooo, Your class ApplicationUser inherits from IdentityUser if I'm not mistaken, IdentityUser is a base class and not an interface, c# only allows inheritance from one base, I recommend you make a base Interface forcing an Id and then set a type of int for each of the Identity domain classes e.g:<br /><br />public class ApplicationUser : IdentityUser, IEntityBase<br /> {<br /> public virtual ICollection AspFiles { get; set; }<br /> }<br /><br />public interface IEntityBase<br /> {<br /> int Id { get; set; }<br /> }<br /><br />public class EntityBase : IEntityBase<br /> {<br /> public int Id { get; set; }<br /> }<br /><br />Then cast it and create an instance of IIdentityBase:<br /><br />EntityMappingBase;<br /><br />From Mikeyyyyy<br />Anonymoushttps://www.blogger.com/profile/06256050675714107976noreply@blogger.comtag:blogger.com,1999:blog-8525160902548525190.post-81573368820359066932017-03-31T15:22:17.077+11:002017-03-31T15:22:17.077+11:00Not as good as Scott Hanselman ;)Not as good as Scott Hanselman ;)Anonymoushttps://www.blogger.com/profile/06256050675714107976noreply@blogger.com