Skip to content

Instantly share code, notes, and snippets.

@robashton
Created April 4, 2011 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robashton/902392 to your computer and use it in GitHub Desktop.
Save robashton/902392 to your computer and use it in GitHub Desktop.
Finding the method being loaded
var actualCall = dynamicMethodCalls.Last();
var current = actualCall.Previous;
if(current.OpCode.Code == Code.Ldstr)
{
columnType = typeof (string);
}
string tableName = references[0];
string columnName = references[1].Replace("FindBy", "");
Type columnType = null;
model.Table(tableName)
.Column(columnName)
.SetType(columnType);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment