SHARE
TWEET

Untitled

a guest Oct 13th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class FrontEndTestController : Controller
  2. {
  3.     private IFrontEndTestRepository frontEndTestRepository;
  4.  
  5.     public FrontEndTestController(IFrontEndTestRepository frontEndTestRepository)
  6.     {
  7.         this.frontEndTestRepository = frontEndTestRepository;
  8.     }
  9.     public ViewResult GetFrontEndTestView()
  10.     {
  11.         var dataSourceId = RenderingContext.Current?.Rendering?.DataSource;
  12.         var viewModel =
  13.             dataSourceId != null
  14.             ? frontEndTestRepository.GetFrontEndTestModel(dataSourceId)
  15.             : new FrontEndTest();
  16.  
  17.         return View("FrontEndTest", viewModel);
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top