Esempio n. 1
0
        public Response Put(App request)
        {
            request.Name = request.Name.Trim();
            request.ImageUrl = request.ImageUrl.Trim();

            if (string.IsNullOrWhiteSpace(request.Name))
            {
                throw new ArgumentNullException("request", "App name is required");
            }

            Db.Save(request.ConvertTo<App>());
            if (request.Id != Guid.Empty)
            {
                return new Response(true);
            }

            string id = request.SteamId + request.Name + request.Id;
            Request.RemoveFromCache(base.Cache, id);
            return new Response(true);
        }