14 lines
395 B
C#
14 lines
395 B
C#
|
using SharpChat.Users;
|
||
|
|
||
|
namespace SharpChat;
|
||
|
|
||
|
public static class UsersContextExtensions {
|
||
|
public static bool UserWithLegacyNameExists(this UsersContext ctx, string name) {
|
||
|
return ctx.UserExists(u => u.LegacyNameEquals(name));
|
||
|
}
|
||
|
|
||
|
public static User? GetUserByLegacyName(this UsersContext ctx, string name) {
|
||
|
return ctx.GetUser(u => u.LegacyNameEquals(name));
|
||
|
}
|
||
|
}
|