Skip to content

Instantly share code, notes, and snippets.

@WrackedFella
WrackedFella / cookie-manager.service.ts
Last active July 17, 2018 14:46 — forked from mindplay-dk/cookie.js
Simple client-side cookie reader/writer service in Typescript
using System;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.JsonPatch;
using Microsoft.AspNetCore.Mvc;
using My.Dal;
@model object
@if (!ViewData.ModelState.IsValid)
{
<div class="row alert alert-danger alert-dismissible fade show" role="alert">
<div class="col-lg-auto mr-auto my-auto">
@Html.ValidationSummary(true)
</div>
<div class="col-lg-auto">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
@model object
@{var enumerableModelData = ViewData.ModelMetadata.Model as IEnumerable<object>;}
@if (enumerableModelData != null)
{
if(enumerableModelData.Count() < 1)
{
@SiteStrings.NoData
return;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using AutoMapper.QueryableExtensions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using MyProject.Api.ExceptionHandling.CustomExceptions;
using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using My.Dal.Core;
namespace Dal
{
public static class DbContextExtensions