lfaldanam / sharp-architecture

Automatically exported from code.google.com/p/sharp-architecture
Other
0 stars 0 forks source link

New Issues: LINQ and Using attributes insted of Id as PK #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to use the NHibernate wrapper that this platform has and I'm
stuck with some problemas:

1º I want that all my queries be in LINQ structure and don't use the
ICriteria as the NHibernate and your platform use.
I think that this change it's not that hard.

2º Insted of use a Id as Primary Key (and Integer) you can use an Custom
Attribute to identify what will be the PK

Ex: 
[IsPrimaryKey()]
public string UserGUID {  get; set; }

with this custom attribute I can set my PK as any field and with any data
type. Right now we as stuck with the name and the data type. We can't have
more then one PK too... with this custom attribute we can have more then on PK.
Of course I'm using AutoMapping to map database and objects....

3º can you release just the NHibernate Wrapper? I can help do that. This
will be a great project.
I'm using your project to try to create a new one with this changes. I want
to that the same object could swing between NHibernate and LINQ Entities
just changing a few code as possible. Until now without any success.

hope that my suggestions could improve this platform.

Regards
Paulo Aboim Pinto
Odivelas - Portugal

Original issue reported on code.google.com by aboimpi...@gmail.com on 1 Apr 2009 at 11:28

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion Paulo.  If you want to use a different type than int,
please use IRepositoryWithTypedId<>.  The documentation has further details 
about this.

Original comment by wmccaffe...@gmail.com on 2 May 2009 at 5:34