public void Insert(ContactsBackendMap entity) { try { using (FAXPECContext dbcontext = new FAXPECContext()) { RUBR_CONTATTI_BACKEND b = DaoSQLServerDBHelper.MapToRubrContattiBackend(entity); dbcontext.RUBR_CONTATTI_BACKEND.Add(b); int risp = dbcontext.SaveChanges(); if (risp == 1) { entity.Id = (int)b.ID_MAP; } } } catch { throw; } }