public void MapEntityToModel() { var mapper = new DALEventStudentMapper(); EventStudent item = new EventStudent(); item.SetProperties(1, 1, 1); ApiEventStudentServerResponseModel response = mapper.MapEntityToModel(item); response.EventId.Should().Be(1); response.Id.Should().Be(1); response.StudentId.Should().Be(1); }
public void MapEntityToModelList() { var mapper = new DALEventStudentMapper(); EventStudent item = new EventStudent(); item.SetProperties(1, 1, 1); List <ApiEventStudentServerResponseModel> response = mapper.MapEntityToModel(new List <EventStudent>() { { item } }); response.Count.Should().Be(1); }
public virtual EventStudent MapModelToEntity( int id, ApiEventStudentServerRequestModel model ) { EventStudent item = new EventStudent(); item.SetProperties( id, model.EventId, model.StudentId); return(item); }