public static HomeIndexViewModel ForUserPage(string username, int Page_ID) { IInfastructureService infastructure = new InfastructureService(); IDrawingService service = new DrawingService(); return new HomeIndexViewModel { navSection = infastructure.PageStructure_GetBySelected(Page_ID), Images = service.Image_GetByUser(username) }; }
public static ImageViewModel ForImageUserPage(int Image_ID, string username, int Page_ID) { IDrawingService service = new DrawingService(); IInfastructureService infastructure = new InfastructureService(); return new ImageViewModel { navSection = infastructure.PageStructure_GetBySelected(Page_ID), image = service.Image_GetTarget(username, Image_ID) ?? new DImage() }; }