public static bool Insert(Guid id, string name, Guid catID) { try { using (var context = new GeopersonContext()) { var model = ItemSubCategoryVM.Set(id, name, catID, false); context.ItemSubCategoryDB.Add(model); context.SaveChanges(); return(true); } } catch { return(false); } }