public override Task <Empty> DeleteCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { CompanyLocationPoco poco = _logic.Get(Guid.Parse(request.Id)); _logic.Delete(new CompanyLocationPoco[] { poco }); return(new Task <Empty>(() => new Empty())); }
public override Task <Empty> DeleteCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { _ = _logic.Get(Guid.Parse(request.Id)) ?? throw new ArgumentNullException("No Company Location Record with this Id Found "); _logic.Delete(new CompanyLocationPoco[] { _logic.Get(Guid.Parse(request.Id)) }); return(null); }
public override Task <Empty> DeleteCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { CompanyLocationPoco[] pocos = new CompanyLocationPoco[1]; pocos[0].Id = Guid.Parse(request.Id); pocos[0].Company = Guid.Parse(request.Company); pocos[0].CountryCode = request.CountryCode; pocos[0].Province = request.Province; pocos[0].Street = request.Street; pocos[0].City = request.City; pocos[0].PostalCode = request.PostalCode; _logic.Delete(pocos); return(new Task <Empty>(null)); }
public override Task <Empty> UpdateCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { CompanyLocationPoco[] pocos = { new CompanyLocationPoco() { Id = Guid.Parse(request.Id), Company = Guid.Parse(request.Company), Street = request.Street, City = request.City, Province = request.Province, CountryCode = request.CountryCode, PostalCode = request.PostalCode } }; _logic.Update(pocos); return(new Task <Empty>(() => new Empty())); }
public override Task <Empty> UpdateCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { CompanyLocationPoco[] pocos = new CompanyLocationPoco[1]; foreach (var poco in pocos) { poco.Id = Guid.Parse(request.Id); poco.Company = Guid.Parse(request.Company); poco.CountryCode = request.CountryCode; poco.Province = request.Province; poco.Street = request.Street; poco.City = request.City; poco.PostalCode = request.PostalCode; } _logic.Update(pocos); return(new Task <Empty>(() => new Empty())); }
public override Task <Empty> CreateCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { CompanyLocationPoco poco = new CompanyLocationPoco() { Id = Guid.Parse(request.Id), Company = Guid.Parse(request.Company), Street = request.Street, City = request.City, Province = request.Province, CountryCode = request.CountryCode, PostalCode = request.PostalCode, }; _logic.Add(new CompanyLocationPoco[] { poco }); return(null); }
public CompanyLocationPoco[] GetArray(CompanyLocationPayload request) { CompanyLocationPoco poco = new CompanyLocationPoco() { Id = Guid.Parse(request.Id), Company = Guid.Parse(request.Company), CountryCode = request.CountryCode, Province = request.Province, Street = request.Street, City = request.City, PostalCode = request.PostalCode }; CompanyLocationPoco[] pocos = new CompanyLocationPoco[1]; pocos[0] = poco; return(pocos); }
public override Task <Empty> UpdateCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { _ = _logic.Get(Guid.Parse(request.Id)) ?? throw new ArgumentNullException("No Company Location Record with this Id Found"); var poco = new CompanyLocationPoco() { Id = Guid.Parse(request.Id), Company = Guid.Parse(request.Company), Street = request.Street, City = request.City, Province = request.Province, CountryCode = request.CountryCode, PostalCode = request.PostalCode, }; _logic.Update(new CompanyLocationPoco[] { poco }); return(null); }
public override Task <Empty> DeleteCompanyLocation(CompanyLocationPayload request, ServerCallContext context) { _logic.Delete(GetArray(request)); return(new Task <Empty>(null)); }