简体   繁体   中英

ReSharper not displaying properties from underlying class when creating equality comparers

My setup is the following:

I have POCO classes which are generated by T4 templates based off of my database. My domain models inherit from these POCOs. Basically the POCO models are there so that when I change the database I don't have to update the model by hand all the time (we use Dapper as our ORM).

My question is:

When I try to use ReSharper to generate equality comparers for my domain models the resharper interface does not include properties from the underlying POCO class only the properties from the domain model. Why is this happening when, in my case, domain models inherit from the POCOs and therefore have all the properties from the POCOs?

This is my POCO class:

 namespace Models.Database
 {
      [Table("Restaurants")]
      public abstract class Restaurant
      {
           [Key]
           public virtual int Id { get; set; }
           public virtual string RestaurantName { get; set; }
           public virtual int? PreferredDayOfWeek { get; set; }
           public virtual int? RestaurantTypeId { get; set; }
      }
 }

And then my domain model is:

 public class Restaurant : Models.Database.Restaurant
 {
      public virtual RestaurantType RestaurantType { get; set; }
 }

这是已知问题,R#8.0的计划功能,对不起:(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM