mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
20 lines
No EOL
498 B
C#
20 lines
No EOL
498 B
C#
using System.Text;
|
|
using System.Linq;
|
|
using System.Collections.Generic;
|
|
using System;
|
|
|
|
namespace DapperExtensions.Mapper
|
|
{
|
|
/// <summary>
|
|
/// Automatically maps an entity to a table using a combination of reflection and naming conventions for keys.
|
|
/// </summary>
|
|
public class AutoClassMapper<T> : ClassMapper<T> where T : class
|
|
{
|
|
public AutoClassMapper()
|
|
{
|
|
Type type = typeof(T);
|
|
Table(type.Name);
|
|
AutoMap();
|
|
}
|
|
}
|
|
} |