Innovenergy_trunk/csharp/app/API/DataModel/UserParent.Extensions.cs

19 lines
418 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
namespace InnovEnergy.API.DataModel;
public static class UserParentExtensions
{
public static Boolean Remove(this UserParent parent, User user)
{
return parent.Users.Remove(user);
}
public static void Add(this UserParent parent, User user)
{
parent.Users.Add(user);
}
public static Boolean IsEmpty(this UserParent parent)
{
return !parent.Users.Any();
}
}