Environment name will be pulled from environment variable: ASPNETCORE_ENVIRONMENT
10 lines
239 B
C#
10 lines
239 B
C#
using System;
|
|
|
|
namespace YABA.Common.Utils
|
|
{
|
|
public static class EnvironmentUtils
|
|
{
|
|
public static bool IsDevelopmentEnvironment() => Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development";
|
|
}
|
|
}
|