public void UpdateStadium(StadiumBL element) { Stadium toUpdate = DB.Stadiums.Read(element.Id); if (toUpdate != null) { toUpdate = Mapper.Map <Stadium>(element); DB.Stadiums.Update(toUpdate); DB.Save(); } }
public void AddStadium(StadiumBL element) { DB.Stadiums.Create(Mapper.Map <Stadium>(element)); DB.Save(); }