Skip to content

Instantly share code, notes, and snippets.

View tusmester's full-sized avatar
🎯
Cleaning up stuff and preparing for the future.

Miklós Tóth tusmester

🎯
Cleaning up stuff and preparing for the future.
View GitHub Profile
@tusmester
tusmester / post.snmvc.dashboardviewmodel.cs
Created February 8, 2018 12:51
#sn #mvc #viewmodel #dashboard
using SenseNet.ContentRepository;
using SenseNet.Search;
using System.Collections.Generic;
using System.Linq;
namespace SnWebApplication.Models
{
public class DashboardViewModel
{
public IEnumerable<TaskViewModel> MyTasks => Content.All
@tusmester
tusmester / post.snmvc.dashboardcontroller.cs
Created February 8, 2018 12:49
#sn #mvc #controller #dashboard
using System.Web.Mvc;
using SnWebApplication.Models;
namespace SnWebApplication.Controllers
{
public class DashboardController : Controller
{
public string SitePath { get; } = "/Root/Sites/Default_Site";
public string TaskListName { get; } = "Tasks";
public string TaskListPath => SitePath + "/" + TaskListName;
@tusmester
tusmester / post.snmvc.views.index.cshtml
Created February 8, 2018 12:46
#sn #mvc #view #index
@{
ViewBag.Title = "Dashboard";
}
@model SnWebApplication.Models.DashboardViewModel
<h2>@ViewBag.Title</h2>
<h3>@ViewBag.Message</h3>
<div class="row">
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using SenseNet.ContentRepository;
using SenseNet.ContentRepository.Storage.Security;
using SenseNet.Search;
namespace SnWebApplication.Models
{