Exemplo n.º 1
0
 bool IUserType.Insert(UserTypeViewModel model)
  {
      using (var ent = new CustomerSupportEntities())
      {
          var newRow = new tblUserType();
          newRow.UserTypeName = model.UserTypeName;
          newRow.UserTypes.Add(newRow);
          int success = ent.SaveChanges();
          if (success > 0)
          {
              return true;
          }
          else
          {
              return false;
          }
      }
  }
Exemplo n.º 2
0
 bool ISoftwareType.Insert(SoftwareTypeViewModel model)
 {
     using (var ent = new CustomerSupportEntities())
     {
         var newRow = new tblSoftwareType();
         newRow.SoftwareTypeName = model.SoftwareTypeName;
         ent.tblSoftwareTypes.Add(newRow);
         int success = ent.SaveChanges();
         if (success > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }