This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model object | |
@{var enumerableModelData = ViewData.ModelMetadata.Model as IEnumerable<object>;} | |
@if (enumerableModelData != null) | |
{ | |
if(enumerableModelData.Count() < 1) | |
{ | |
@SiteStrings.NoData | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
namespace IntegrationTest | |
{ | |
internal class BasicRequestWithHttpClient | |
{ | |
private const string Username = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model EntityBase | |
@using System.ComponentModel | |
@using System.ComponentModel.DataAnnotations | |
@using System.Reflection | |
@using Microsoft.AspNetCore.Mvc.Localization | |
@using Microsoft.Extensions.Localization | |
@inject IHtmlLocalizer<DataAnnotationResources> DataAnnotationLocalizer | |
@inject IStringLocalizer<SharedResources> SharedLocalizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class Status : TypeSafeEnum | |
{ | |
private static readonly Dictionary<int, Status> Instance = new Dictionary<int, Status>(); | |
public static readonly Status Active = new Status(0, "Active", 'A'); | |
public static readonly Status Inactive = new Status(1, "InActive", 'I'); | |
private Status(int value, string name, char code) : base(value, name, code) | |
{ | |
Instance[value] = this; | |
} |
OlderNewer