public int ObtenerIdVehiculoPorPlaca(string Placa, short IdEstado) { VehiculosModelView VH = null; try { VH = (from t in context.SP_S_Vehiculo(IdEstado).ToList() where t.Placa == Placa select new VehiculosModelView() { IdVehiculo = t.IdVehiculo }).FirstOrDefault(); if (VH == null) { VH = new VehiculosModelView(); } } catch (Exception ex) { VH = null; throw ex; } return(VH.IdVehiculo); }