コード例 #1
0
        public async Task <IHttpActionResult> Edit(TipoDocSoporte model)
        {
            try
            {
                db.Entry(model).State = EntityState.Modified;
                await db.SaveChangesAsync();

                AddLog("", model.Id, model);

                return(Ok(true));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
コード例 #2
0
        public async Task <IHttpActionResult> Create(TipoDocSoporte model)
        {
            try
            {
                db.TipoDocSoporte.Add(model);
                await db.SaveChangesAsync();

                AddLog("", model.Id, model);

                return(Ok(true));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }