public int SaveProducto(producto objProducto) { try { var response = _context.producto.Add(objProducto); _context.SaveChanges(); return(objProducto.prin_producto_id); } catch (Exception) { throw; } }
public roles SaveRol(roles objRol) { Log.Inicio(); try { Log.Debug("Accion: Guarda rol; recurso:CPersistencia"); var response = _context.roles.Add(objRol); _context.SaveChanges(); Log.Fin(); return(objRol); } catch (Exception ex) { Log.Error(ex); throw; } }
public empresa SaveEmpresa(empresa objEmpresa) { Log.Inicio(); try { var response = _context.empresa.Add(objEmpresa); _context.SaveChanges(); Log.Fin(); //return objEmpresa.embi_empresa_id; return(objEmpresa); } catch (Exception ex) { Log.Error(ex); throw; } }