public ActionResult Data() { madrigaldev_testEntities data = new madrigaldev_testEntities(); var datos = data.t_empresa.ToList(); return(PartialView("_DataList", datos)); }
public ActionResult Insert(t_empresa model) { madrigaldev_testEntities context = new madrigaldev_testEntities(); var added = context.t_empresa.Add(model); context.SaveChanges(); CustomerHub.BroadcastData(); return(View("Insert")); }
public Task AddEmpresa(EmpresaModel model) { try { var _context = new madrigaldev_testEntities(); var empresaAdded = new t_empresa(); var empresaToAdd = Mapper.Map <t_empresa>(model); empresaAdded = _context.t_empresa.Add(empresaToAdd); _context.SaveChanges(); return(Task.FromResult(empresaAdded)); } catch (Exception ex) { throw ex; } }