add error catching
This commit is contained in:
parent
78776706a7
commit
77051bcf84
@ -28,7 +28,13 @@ namespace data.Repository
|
||||
|
||||
public IEnumerable<GroupDAO> getAllGroup()
|
||||
{
|
||||
return dbContext.groups.ToList();
|
||||
try
|
||||
{
|
||||
return dbContext.groups.ToList();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
return new List<GroupDAO>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user