Need help with my mapping , I've got lets say a "Anclajes" and another one
that logs the Error of the "Anclajes" with
Error_anclajeID|AnclajeId|Status|DateTime I need that when Get all
"Anclajes" , the "Anclajes" only have 1 Property with the LastOrDefault
Error from Gq_error_anclaje . This is what i came with so far but dont know
how to tell it the get the last row
public MapGq_anclajes():base()
{
References(x =>
x.Status_Anclaje).Column("AnclajeId").ReadOnly().Not.LazyLoad();
}
public class Gq_anclajes : _Gq_anclajes{
public virtual Gq_error_anclaje Error_Anclaje { get; set; } }
Right now im using this to get last status foreach "Anclaje"
foreach(item in Anclajes){
var error = Services.Get<ServGq_error_anclaje>().findBy(x => x.AnclajeId ==
item.AnclajeId).OrderByDescending(c => c.Modificado).FirstOrDefault();
}
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/d/optout.