Beispiel #1
0
        public Supplier QuerySuppliers(string id)
        {
            var model = _collection.Find(_ => id == _.Id.ToString())
                        ?? throw new ArgumentNullException(nameof(QuerySuppliers));

            return(ModelToEntityMapper.Map(model));
        }
Beispiel #2
0
        public Supplier QuerySuppliers(string id)
        {
            var model = _collection
                        .AsQueryable()
                        .Where(_ => id.Equals(_.Id.ToString()))
                        .SingleOrDefault();

            return(ModelToEntityMapper.Map(model));
        }