示例#1
0
        public ActionResult Put(int id, [FromBody] ContaLuz entity)
        {
            var imovel = imovelRepositories.GetByID(entity.idimovel);

            if (imovel != null)
            {
                entity.imovel = imovel;
            }

            Repositories.Update(entity);

            return(Ok(new
            {
                status = "200",
                msg = "OK",
                obj = entity
            }));
        }
示例#2
0
 public RedirectToActionResult Update(ContaLuz contaLuz)
 {
     contaLuzRepositories.Update(contaLuz);
     return(RedirectToAction("Index"));
 }