Ejemplo n.º 1
0
 public int AddTheme(Theme theme)
 {
     using (ThemesDAO.Connection = ConnectionSettings.CreateDBConnection())
     {
         return ThemesDAO.AddTheme(theme);
     }
 }
Ejemplo n.º 2
0
 public int AddTheme(Theme theme)
 {
     return DbTemplateHelper<int>.GetValueByProcedure(
         Connection,
         "config.inserttheme",
         new DbParameterHelper[]
         {
             new DbParameterHelper(DbType.String,    "p_name",           theme.Name),
             new DbParameterHelper(DbType.String,    "p_nameAbbr",       theme.NameAbbr),
             new DbParameterHelper(DbType.Int32,     "p_providerid",     theme.ProviderID)
         });
 }
Ejemplo n.º 3
0
 public void GetProviderThemesTest()
 {
     ThemesDAO target = new ThemesDAO(connnetion);
     int providerId = 1;
     Theme expected = new Theme
     {
         ID = 1,
         Name = "Território",
         NameAbbr = "Território",
         ProviderID = 1
     };
     IEnumerable<Theme> actual = target.GetProviderThemes(providerId);
     Assert.AreEqual(1, actual.Count());
     Assert.AreEqual(expected, actual.ElementAt(0));
 }