public EntityContract GetByOrderFolio(int OrderID, string Folio) { var data = base.DataContext.ContratReceipt.Where(p => p.Fk_OrderID == OrderID && p.Folio == Folio); if (data.Count() == 1) { return(FactoryContrat.Get(data.Single())); } else { return(null); } }
public EntityContract Get(int Id) { var data = base.DataContext.ContratReceipt.Where(p => p.PK_ContratID == Id); if (data.Count() == 1) { return(FactoryContrat.Get(data.Single())); } else { return(null); } }