123/123/Data/ReportsHistory/GroupRepositoty.cs

30 lines
851 B
C#
Raw Normal View History

using _123.Data.LocalData.Entity;
using _123.Data.LocalData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _123.Data.ReportsHistory
{
public class GroupRepositoryImpl
{
public List<GroupLocalEntity> GetAllGroups() => LocalStaticData.groups;
2024-10-18 08:32:27 +00:00
public GroupLocalEntity? UpdateGroup(String name)
{
GroupLocalEntity? groupLocal = GetAllGroups()
2024-10-18 08:32:27 +00:00
.Where(x => x.Name == name).FirstOrDefault();
if (groupLocal == null) return null;
2024-10-18 08:32:27 +00:00
groupLocal.Name = name;
return groupLocal;
}
2024-10-18 08:32:27 +00:00
//public GroupLocalEntity AddGroup(String name, String id)
//{
// List<GroupLocalEntity> groups => new List<GroupLocalEntity>
//}
}
}