Yes and no!
Both are caused by Insulin
lacking, however of the two types, little Insulin (type 1-dm), or relatively too little (type 2-dm) caused by the body becoming resistant to it's own insulin.
Insulin is necessary to put fat in a cell, without it you burn fat, as in juvenile onset type-1 dm.
Most people do not know that type-2 dm is far more hereditable than type one.