public static RestuarantReviewDataLayer.Reviewer LibraryToData(RestaurantLibrary.Models.Reviewer libraryReviewer) { var dataModel = new RestuarantReviewDataLayer.Reviewer() { name = libraryReviewer.name, email = libraryReviewer.email }; return(dataModel); }
// parameter is the EF Restuarant model public static RestaurantLibrary.Models.Reviewer DataToLibrary(RestuarantReviewDataLayer.Reviewer reviewer) { var libModel = new RestaurantLibrary.Models.Reviewer() { name = reviewer.name, email = reviewer.email }; return(libModel); }