public void Add(Types.DTO.TeamDTO team) { Team mdlTeam = (Team)P1PObjectMapper.Convert(team, typeof(Team)); mdlTeam.InsertDate = DateTime.Now; using (p1p.Data.P1PContext ctx = new p1p.Data.P1PContext()) { ctx.Teams.Add(mdlTeam); ctx.SaveChanges(); } }
public void Add(Types.DTO.TeamDTO team) { repo.Add(team); }