public static DAL.Opinion GetOpinion(DTO.NewFolder1.Opinion Opiniondto) { if (Opiniondto == null) { return(null); } DAL.Opinion opinion = new DAL.Opinion() { OpinionId = Opiniondto.OpinionId, ProfPersonid = Opiniondto.ProfPersonid, description = Opiniondto.description, Date = Opiniondto.Date, Mark = Opiniondto.Mark, Professions = NewFolder1.Profession.GetProfession1(Opiniondto.Profession) }; return(opinion); }
public static Opinion GetOpinion(DAL.Opinion o) { if (o == null) { return(null); } Opinion dto = new Opinion() { OpinionId = o.OpinionId, ProfPersonid = o.ProfPersonid.Value, description = o.description, Date = o.Date.Value, Mark = Convert.ToInt32(o.Mark), Profession = NewFolder1.Profession.GetProfession1(o.Professions) }; return(dto); }