public Supplier QuerySuppliers(string id) { var model = _collection.Find(_ => id == _.Id.ToString()) ?? throw new ArgumentNullException(nameof(QuerySuppliers)); return(ModelToEntityMapper.Map(model)); }
public Supplier QuerySuppliers(string id) { var model = _collection .AsQueryable() .Where(_ => id.Equals(_.Id.ToString())) .SingleOrDefault(); return(ModelToEntityMapper.Map(model)); }