public static Group GetGroupFromName(string name)
{
using (SqlConnection connection = ConnectionManager.GetConnection())
{
var data = new ActivEarthDataProvidersDataContext(connection);
int? groupId = (from g in data.GroupDataProviders
where g.name.ToLower() == name.ToLower()
select g.id
).FirstOrDefault();
if (groupId == null)
{
return null;
}
return GetGroupFromGroupId((int) groupId);
}
}