Dapper.Contrib Support for composite primary key - dapper-contrib

Hy people, I have a short question to ask:
is there any support for composite primary keys in Dapper.Contrib,
and if not, dose anyone have an implementation i can use?
Thank you !

Ok, so i did a bit of searching and came to the conclusion that DapperExtensions is more suited to my project needs as it supports composite primary keys via fluent mapping, while Contrib uses attributes. off course, it dose state here that Contrib dose not support composites, but I was still wondering if someone may have implemented it. In any case, DapperExtensions better fits my use case.

Related

Tests name convention best practices

Does anyone knows some good references to guide me in order to give automated tests, the best possible names? I know the rules but want good references to support some of the names that I used. Thanks in advance

How to know the length of a key and the key itself in the context of Friedman test and Vigenere cipher

The title says it all... I can't seem to get the idea... I know it uses the index of coincidence but I'm not sure with whom or what am I supposed to compare it with... How is the formula used?... It would help me a lot if it were exposed in an algorithmic representation...
This link should probably light up your mind...
http://practicalcryptography.com/cryptanalysis/stochastic-searching/cryptanalysis-vigenere-cipher/
I'm using the book Cryptography Theory and Practice Third Edition, and it's horrible. It states the formula but never a concrete example.

Pros and cons of each key generation strategy in RavenDB

I'm migrating a SQL database of a web application to RavenDB and my team is trying to define what key generation strategy is the best for us.
The main discussion point is whether we use natural keys or surrogate keys. So I would like to know the pros and cons of each strategy in RavenDB.
Thanks
The recommended solution is to let RavenDB handles them for you.
It will generate things like "items/2", etc.
To start with, those are plenty good enough, human readable and easy to generate efficiently.
You can also do things like "users/ayende", but I would wait for that until you have more experience with RavenDB.
Finally, for advance stuff, you have keys such as "customers/1234/orders/8234" which opens up some really nice option for advanced scenarios.
If you build too much logic in your keys you may regret it later unless you know your problem domain well. We do a fair amount of RavenDB work in PHP, since there is no client. We prototype in C# then usually follow what the client creates. Sometimes the auto-pluralization's come out funny like People might be Peoples. This normally does not matter unless you are hitting RavenDB directly from Javascript. Then the only downfall is friends may question your English skills.

What's the most productive way to do NHibernate mapping?

I know annotations to do the hibernate mapping in Java and am looking now for a similar way to do the same in C# and NHibernate. I found out that there exists several approaches
do the mapping in xml files
NHibernate.Mapping.Attributes (NHMA)
Fluent
are there any more??
I tried NHMA and found out it had some blocking points for me...
I don't want you to discuss, whats the best way to map models to NHibernate, but I was looking for a good comparison on the internet.
Do you know such sites? What facts are the main points to consider, if I choose one of the "frameworks" listed above? I'm thinking of aspects like 'is this project offically supported by the NH-Developers?', 'are there models that can be mapped in xml-mapping but not in fluent/NHMA/etc...?'
What can you recommend?
Why?
Fluent NHibnernate auto mapping or code generation (CodeSmith, MyGeneration, T4, etc.) are the most productive ways to create the mapping files. I dislike the attributes approach because I like to keep my POCOs plain.
Another option, if you don't mind attributes, is Castle ActiveRecord.
Here's an article that might help you decide.

ORM frameworks

I need to collect some information about existing ORM solutions.
Please feel free to write about any programming language.
Can you tell about the best ORM framework you ever use and why is it better then others?
I used NHibernate and Entity Framework.
Current stable version of entity framework is very immature. It is too difficult, or impossible to perform common tasks. Testing your code is also difficult since you cannot really separate your entities from your data access classes. But it perfectly integrates with visual studio ide. Setting up is easy and updating all the models from database takes just a few seconds. Upcoming version of EF (4.0) will solve some of this problems.
NHibernate is quite powerful. It supports plain old clr objects, so you can work with simple entities. Configurations provide great control in great detail. Framework capabilities are satisfying and it has a large and active community and good documentation. Setting up and updating entities is a little difficult since you must use generators that looks up your database and generates entities and xml files. It may be tricky to find a generator or a template that exactly fits your needs. But once you set all things up, you will love it.
I found LINQ to SQL to be a pretty straight forward solution. The first time I used it, I'd say I had a basic ORM working within a few hours, and was creating LINQ queries with it.
Microsoft has an additional ORM (Entity Framework), which I've heard is more complex but may be useful for highly complex distributed applications with multiple data sources etc.
Overall I found LINQ to be an easy and fast to use ORM.
I have been looking at Telerik Open Access for last few months, in genernal this ORM has been a pain to work with, it was advertised as having extensive linq support but in reality many of the linq features you would normally expect dont work server side and are performed on the client. I also had problems using multiple conditions in a where clause, see my last question. Here are a few things that i found
No support for views
Unable to map more than one entity to the same table
Inheritance and Interface support requires you to make changes to you database schema
No visual designer like LINQ to SQL and Entity Framework
If you want to perform an insert any related entities must be fetched first
Rohan
LINQ2SQL was nice, EF makes sense, but is very complex and SQL Server oriented. NHibernate is special and Telerik OpenAccess (fully .NET / Visual Studio) got a broad set of functionality and professional support.
Since I know the product I can comment on Rohan's concerns:
Existing Views can be used and full Views support is coming up
Mapping more than one entity to the same table "works" for class hierarchies, limitation with reverse mapping exists
Inheritance and Interfacer support "do not require" changes to the the database schema, again limitation with reverse mapping exists though
Visual Designer will come, Forward and Reverse Mapping Wizards allow you already to do anything in an easy way
There is a workaround for the insert issue mentioned and it will be fixed generally
Check out the Telerik site to find happy customers and feel free to use the telerik forums and support resources for any question.
-Peter
Im new to OpenAccess ORM and we are using two products. Reporting and OpenAccess.
I think there are some features that people missed.
OpenAccess uses graphical designers while nHibernate still uses handwritten xml files
OpenAccess is not limited to SQl Server as EF4 and similiar frameworks
using it is easier and the forums are pretty helpful.
With ORM there are multiple possibilities, all depends what you want.
As a real ORM mapper I strongly recomment NHibernate and Fluent NH mappings. You need a lot of research to put together a nice architecture, but then nothing stands in your way. With minimal compromises you get real flexibility.
EF6x (core is not prod.-ready IMHO) is called an ORM, but what it generates is more closer to a DAL. There are some thing's you can't do effectively with EF6. Still, this is my favorite tool for a read-model, while I do combine it with NHibernate (where NH I use for a DDD/write model).
Now to performance - its always pro and cons. If you deep deeper into ORM architecture (see my article: avoid ORM bad habits) then you will find intuitively the ways to make it faster. Here's my another article on how to make EF6x 5x faster (at least for read situations): EF6.x 5x faster