forked from DenisLevitin/ShootServ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShooterCategoryLogic.cs
39 lines (35 loc) · 1.09 KB
/
ShooterCategoryLogic.cs
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
31
32
33
34
35
36
37
38
39
using BO;
using DAL;
using System.Collections.Generic;
using System.Linq;
namespace BL
{
/// <summary>
/// Логика работы со справочником разрядов разрдами
/// </summary>
public class ShooterCategoryLogic
{
private readonly ShooterCategoryRepository _dalShooterCategory;
public ShooterCategoryLogic()
{
_dalShooterCategory = new ShooterCategoryRepository();
}
/// <summary>
/// Получить разряд стрелка по идентификатору
/// </summary>
/// <param name="id">ид. разряда</param>
/// <returns></returns>
public ShooterCategoryParams Get(int id)
{
return _dalShooterCategory.GetById(id);
}
/// <summary>
/// Получить список разрядов
/// </summary>
/// <returns></returns>
public List<ShooterCategoryParams> GetAll()
{
return _dalShooterCategory.GetAll().OrderBy(x=>x.OrderSort).ToList();
}
}
}