add error catching

This commit is contained in:
1eG0ist 2024-11-17 00:56:50 +03:00
parent 78776706a7
commit 77051bcf84

View File

@ -27,8 +27,14 @@ namespace data.Repository
} }
public IEnumerable<GroupDAO> getAllGroup() public IEnumerable<GroupDAO> getAllGroup()
{
try
{ {
return dbContext.groups.ToList(); return dbContext.groups.ToList();
} }
catch (Exception ex) {
return new List<GroupDAO>();
}
}
} }
} }