public Response Save(ConfigurationContract contract)
        {
            Response response = this.client.Save(contract);
            if (response.Success)
            {
                this.InsertIntoCache(contract);
            }

            return response;
        }
Exemplo n.º 2
0
 public Response Save(ConfigurationContract contract)
 {
     try
     {
         this.domain.Save(this.mapper.Map<Configuration, ConfigurationContract>(contract));
         return Response.Valid;
     }
     catch (Exception ex)
     {
         return new Response(ex.Message);
     }
 }
 private void InsertIntoCache(ConfigurationContract contract)
 {
     this.Cache.Insert(KEY, contract, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration);
 }