public HttpResponseMessage GetPartyByCompanyBranchType(int companyId, int branchId, string partyType = "Vendor")
        {
            var party = _partyService.Get(w => w.CompanyId == companyId && w.BranchId == branchId && w.PartyType == partyType && w.Status == true).Select(s => new PartyViewModel
            {
                PartyId      = s.PartyId,
                PartyName    = s.PartyName,
                PartyAddress = s.PartyAddress
            }).FirstOrDefault();

            return(Request.CreateResponse(HttpStatusCode.OK, party));
        }
Пример #2
0
 public Party Search(string term)
 {
     return(_repository.Get(term));
 }
Пример #3
0
        public void Get_PartyWithSnn9206242993_ShouldReturnEmilEkman()
        {
            const string ssn = "9206242993";

            Assert.AreEqual(_partyService.Get(ssn).Name, "Emil Ekman");
        }