public JsonPatchDocument <ApiLessonStatusRequestModel> CreatePatch(ApiLessonStatusRequestModel model) { var patch = new JsonPatchDocument <ApiLessonStatusRequestModel>(); patch.Replace(x => x.Name, model.Name); patch.Replace(x => x.StudioId, model.StudioId); return(patch); }
public virtual ApiLessonStatusRequestModel MapResponseToRequest( ApiLessonStatusResponseModel response) { var request = new ApiLessonStatusRequestModel(); request.SetProperties( response.Name, response.StudioId); return(request); }
public virtual ApiLessonStatusResponseModel MapRequestToResponse( int id, ApiLessonStatusRequestModel request) { var response = new ApiLessonStatusResponseModel(); response.SetProperties(id, request.Name, request.StudioId); return(response); }