Skip to content

schneidenbach/EntityFramework.Metadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

EntityFramework.Metadata

Nuget

Get table metadata for your Entity Framework entities. Need to know the table name of your entity programatically? Schema name? Column name from a property? EntityFramework.Metadata has that and more.

static void Main()
{
    var context = new MyDbContext();
    var personData = context.Db<Person>();

    Console.WriteLine(personData.TableName);
	// output: People

	var nameColumn = personData.Prop("Name");

	Console.WriteLine(nameColumn.ColumnName);
	// output: MyName
}

[Table("People")]
public class Person
{
	public int PersonId { get; set; }
	[Column("MyName")]
	public string Name { get; set; }
}

Forked from EntityFramework.MappingAPI by Markko Legonkov. Fixed bugs, added some unit tests, simplified the code and project structure, and removed support for EF5 and below.

License

This project is licensed under the MIT license. Portions of the code are subject to the BSD Simplified license - see LICENSE for more info.

About

Get table metadata for your Entity Framework entities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published