System.Data.Common.DbDataRecord.IsDBNull(int)

Here are the examples of the csharp api class System.Data.Common.DbDataRecord.IsDBNull(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

View license
public static object GetNextKey(this EntityObjectStore.LocalContext context, Type type) {
            PropertyInfo idMember = context.GetIdMembers(type).Single();
            string query = string.Format("max(it.{0}) + 1", idMember.Name);

            dynamic os = context.GetObjectSet(type);
            ObjectQuery<DbDataRecord> results = os.Select(query);
            DbDataRecord result = results.Single();
            return GetNextKey(type, result.IsDBNull(0) ? 1 : (int) result[0]);
        }