Skip to content

Instantly share code, notes, and snippets.

@lanekatris
Created October 31, 2015 15:41
Show Gist options
  • Select an option

  • Save lanekatris/e93ee4434b901eec5c58 to your computer and use it in GitHub Desktop.

Select an option

Save lanekatris/e93ee4434b901eec5c58 to your computer and use it in GitHub Desktop.
var domainTeam = new Team() { Name = "Team 1", Description = "..." };
public class TeamRepository
{
public void Create(Team team)
{
// Don't forget to do your Mapper.Map<> in your bootstrap code in Global.asax or something or you'll get an unknown map error
var entityFrameworkTeam = Mapper.Map<Entities.Team>(team);
// db.add
// db.savechanges
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment