Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9249929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:19:16+00:00 2026-06-18T10:19:16+00:00

One Update below I have the following class that derives from EqualityComparer<T> that I

  • 0

One Update below

I have the following class that derives from EqualityComparer<T> that I am (attempting) to persist using Fluent/NHibernate.

public class WeeklyGSFEntity : EqualityComparer<WeeklyGSFEntity>
{
    public virtual int IssueNumber { get; set; }
    public virtual int Severity { get; set; }
    public virtual char PainIndex { get; set; }
    public virtual Status Status { get; set; }
    public virtual int Month { get; set; }
    public virtual int Year { get; set; }
    public virtual DateTime DateCreated { get; set; }
    public virtual Region Region { get; set; }
    public virtual DateTime IncidentStart { get; set; }
    public virtual DateTime IncidentEnd { get; set; }
    public virtual int SRCount { get; set; }
    public virtual string AggravatingFactors { get; set; }
    public virtual string AggravatingFactorDescription { get; set; }
    public virtual TimeSpan MTTR
    {
        get
        {
            return (IncidentEnd - IncidentStart);
        }
    }

    public WeeklyGSFEntity()
    {
        Status = Status.New;
    }
    public override int GetHashCode() { ... }

    internal static bool StaticEqual(WeeklyGSFEntity x, WeeklyGSFEntity y) { ... }
    public static bool operator ==(WeeklyGSFEntity x, WeeklyGSFEntity y) { ... }
    public static bool operator !=(WeeklyGSFEntity x, WeeklyGSFEntity y) { ... }
    public override bool Equals(WeeklyGSFEntity x, WeeklyGSFEntity y) { ... }
    public override bool Equals(object obj) { ... }
    public override int GetHashCode(WeeklyGSFEntity obj) { ... }
 }

public enum Status { ... }
public enum Region { ... }

Now, this worked last week. Now when I go to save any entity, I get this message:

 The following types may not be used as proxies:
 Core.Models.WeeklyGSFEntity: method IndexOf should be 'public/protected virtual' or 'protected internal virtual'
 Core.Models.WeeklyGSFEntity: method LastIndexOf should be 'public/protected virtual' or 'protected internal virtual'

As you can see, there are no IndexOf or LastIndexOf methods… 🙂 I’ve tried to override them but they don’t exist to override in the first place!

Any ideas?

Update The First

So I dug into the IL and there is no sign of a method IndexOf or LastIndexOf. Now, before all this happened I did create a new class about conflicts which had a Collection of my WeeklyGSFEntities. Now this collection would have IndexOf and LastIndexOf methods however, I excluded both the mapping and the class from the project…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:19:17+00:00Added an answer on June 18, 2026 at 10:19 am

    Okay so instead of deriving from EqualityComparer<WeeklyGSFEntity> I implemented IEqualityComparer<WeeklyGSFEntity>.
    The issue disappeared…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a calculator class that implements the Strategy Pattern using std::function objects
I have a class with two properties and two methods. Like the one below
One update: I tried using the SummaryRow on the datagrid for its basic functionalities
I have 2 update panel in one update panel i have a datalist and
I need to have MySQL query like this one: UPDATE table_name SET 1 =
I have to update one element on page with Ajax, do I have to
I'm trying to update one value of a compound primary key from within the
I would like to update one of the variables in a vector layer class
In a game application I have the following scenario: From the main game Activity
Updated below . The following is the entire code I have in my main.cpp:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.