 To assess the impact of weight loss due to bariatric surgery, as compared to the effect of optimal medical therapy alone on endothelial function, subclinical atherosclerosis, cardiovascular autonomic function in obese patient affected by type 2 diabetes.The study consists in a 2-arm randomized trial, in which patients will be randomly assigned to bariatric surgery or optimal medical therapy. Each patient will be studied at baseline T0 and 12 months thereafter T1. 