Exemple #1
0
 public bool Save(Model.CacheKey key)
 {
     if (key == null || string.IsNullOrEmpty(key.Name) || key.AppId == 0)
     {
         return(false);
     }
     try
     {
         if (key.Id <= 0)
         {
             _repos.Add(key);
         }
         else
         {
             _repos.Update(key);
         }
         return(true);
     }
     catch {
         return(false);
     }
 }
Exemple #2
0
 public bool Save(int id, string name, string description, int appId)
 {
     Model.CacheKey key = new Model.CacheKey(id, name, description, appId);
     return(Save(key));
 }