Fluent Nhibernate & Linq (Property Not Found) -


I'm working on a web app based on the S Arch Architecture. At the moment I have the code below for my unit.

  [Serializable] Public Intangible Group EventBase: Entity {#region Properties [DomainSignature] Public Virtual String Name {get; Set; } Public Virtual String Description {get; Set; } Public Virtual Agence Range (Receive); Set; } Public Virtual Ent Ratings {get; Set; } Public Virtual Decimal Value {Received; Set; } Public Virtual String PhoneNumber {get; Set; } Receive public virtual string email address; Set; } Public virtual string website {get; Set; } Public Virtual EventState State {Received; Set; } Secure EventBase () {} Safe EventBase (string name, string description) {# ReSharper disabled DoNotCallOverridableMethodsInConstructor name = name; Description = description; Value = 0; State = eventstate new // ReSharper restored DoNotCallOverridableMethodsInConstructor}}  

Thus Fluent is mapped using NHibernate

  Public category EventBaseMap: AutoMap & lt; EventBase & gt; {Public eventbeschp () {id (x => x.id). Unused value (-1). Generated Recognise (); Component & lt; Agreements & gt; (X => x.Ages, M => {m.map (x = & gt; x.fr). Columnname ("edgeform"); m map (x = & gt; x.To) Column name IS ("edge to");}); Included in the class & lt; Music & gt; ("EventID", all => {submap (x = & gt; x.Headliner);}); }}  

I have created a very simple repository using very useful S # ARP Base repository classes.

  Public Interface IEventRepository: INHibernateRepositoryWithTypedId & lt; EventBase, int & gt; {List & lt; Eventbusiness & gt; FindByName (string searchfase); } Public Class Event Repository: NHibernateRepository & lt; EventBase & gt;, IEventRepository {public list & lt; EventBase & gt; FindByName (String Searchforms) {Return Session: Linux  

I can make an institution in DB and return all the records. When I try to test the FindByName method, I get an error below.

NHibernate.QueryException: Could not resolve property: Name: Model.Events.EventBase

Do anyone have any ideas? Is this a problem in my mapping?

Thank you,

This is the automation feature I used to think that you Clearly map those properties that you want to override or do not meet the conventions?

If I add a clear mapping then it solves the problem, but I still can not believe why.


Comments