Mapping table and a simple view with Fluent NHibernate
Posted
by adrin
on Stack Overflow
See other posts from Stack Overflow
or by adrin
Published on 2010-04-27T06:55:09Z
Indexed on
2010/04/27
7:13 UTC
Read the original article
Hit count: 528
I have mapped a simple entity, let's say an invoice using Fluent NHibernate, everything works fine... after a while it turns out that very frequently i need to process 'sent invoices' (by sent invoices we mean all entities that fulfill invoice.sent==true condition)... is there a way to easily abstract 'sent invoices' in terms of my data access layer? I dont like the idea of having aforementioned condition repeated in half of my repository methods. I thought that using a simple filtering view would be optimal, but how could it be done? Maybe I am doing it terribly wrong and someone would help me realize it :)?
© Stack Overflow or respective owner