コード例 #1
0
        public JsonResult UpdateDMS(int dmsid, string name)
        {
            var dmsObj = new DmsProvider()
            {
                DmsProviderId = dmsid,
                Name          = name
            };

            repository.Update(dmsObj);
            repository.Save();

            return(Json(new { success = true }));
        }
コード例 #2
0
        // POST: odata/DealerGroups
        public async Task <IHttpActionResult> Post(DmsProvider DmsProvider)
        {
            try
            {
                repository.Create <DmsProvider>(DmsProvider);
                await repository.SaveAsync();

                return(Created(DmsProvider));
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
コード例 #3
0
        public async Task <IHttpActionResult> Put([FromODataUri] int key, DmsProvider DmsProvider)
        {
            Validate(DmsProvider);

            try
            {
                repository.Update <DmsProvider>(DmsProvider);
                await repository.SaveAsync();

                return(Updated(DmsProvider));
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }