Relative Content

Tag Archive for c#asp.net-coreentity-framework-core

Why is my code not returning any records? Even though there are rows found. (Entity Framework Core)

using Binus.WS.Pattern.Entities; using Microsoft.EntityFrameworkCore.Metadata; using SSG5.C1.BSQWebAPI.Model; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using Microsoft.Extensions.Logging; namespace SSG5.C1.BSQWebAPI.Helper { public class ElectricHistoryHelper { private static readonly ILogger<ElectricHistoryHelper> _logger = LoggerFactory.Create(builder => builder.AddConsole()).CreateLogger<ElectricHistoryHelper>(); public static List<ElectricHistory> GetElectricHistory(ElectricHistory model, string binusianId) { // Fetch the active period ID var PeriodActive = EntityHelper.Get<MsPeriod>(t => t.AuditedActivity != “D” && […]