lx
2025-07-11 05946b151e7010b2b1a851892152e6b5d34151b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using ErrorAnalysis.Repository.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace ErrorAnalysis.Repository
{
    public class COModelRepository : RepositoryBase
    {
        public COModelRepository(string connectionString) : base(connectionString) { }
 
        public List<COModelTable> GetCOModels()
        {
            using (var context = new RetMcnpDbContext(_connectionString))
            {
                return context.COModelTables.Where(c => c.CasingID != "casingID").OrderBy(c => c.BIT).OrderBy(c => c.CasingOD).ToList();
            }
        }
 
        public COModelTable? GetCOModel(string modelId)
        {
            using (var context = new RetMcnpDbContext(_connectionString))
            {
                return context.COModelTables.FirstOrDefault(c => c.ModelID == modelId);
            }
        }
    }
}