lx
2025-07-18 fe5bb447bbc9d325246cf99b980556af62955254
ErrorAnalysis.Repository/COFarWOLRepository.cs
@@ -1,4 +1,4 @@
//using ErrorAnalysis.Repository.Entity;
using ErrorAnalysis.Repository.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,13 +11,13 @@
    {
        public COFarWOLRepository(string connectionString) : base(connectionString) { }
        //public COFarWOLTable GetCOFarWOL(string modelId, int sw)
        //{
        //    using (var context = new RetMcnpDbContext(_connectionString))
        //    {
        //        var result = context.COFarWOLTables.FirstOrDefault(x => x.ModelID == modelId && x.Sw == sw);
        //        return result;
        //    }
        //}
        public COFarWOLTable GetCOFarWOL(string modelId, int sw)
        {
            using (var context = new RetMcnpDbContext(_connectionString))
            {
                var result = context.COFarWOLTables.FirstOrDefault(x => x.ModelID == modelId && x.Sw == sw);
                return result;
            }
        }
    }
}