public PagedResponse <Condominium> List([FromQuery] CondominiumSearchParams searchParams) { return(new PagedResponse <Condominium> { Values = CondominiumService.List(searchParams.ToModel()), MorePages = false }); }
public ActionResult <ObjectResult> UpdateCardData([FromBody] CardData cardData) { try { CondominiumService condominiumService = new CondominiumService(Startup.BeePlaceDataBaseConnectionString); condominiumService.UpdateCardData(cardData); return(StatusCode((int)HttpStatusCode.OK, cardData)); } catch (Exception e) { return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message)); } }
public ActionResult <ObjectResult> InsertManager([FromBody] CondominiumManager condominiumManager) { try { CondominiumService condominiumService = new CondominiumService(Startup.BeePlaceDataBaseConnectionString); condominiumService.InsertManager(condominiumManager); return(StatusCode((int)HttpStatusCode.OK, condominiumManager)); } catch (Exception e) { return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message)); } }
public ActionResult <ObjectResult> Validate(string cnpj) { try { CondominiumService condominiumService = new CondominiumService(Startup.BeePlaceDataBaseConnectionString); var condominium = condominiumService.Validate(cnpj); return(StatusCode((int)HttpStatusCode.OK, condominium)); } catch (Exception e) { return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message)); } }
public ActionResult <ObjectResult> GetCondominium(int idCondominium) { try { CondominiumService condominiumService = new CondominiumService(Startup.BeePlaceDataBaseConnectionString); var condominium = condominiumService.GetCondominium(new Condominium() { Id = idCondominium }); return(StatusCode((int)HttpStatusCode.OK, condominium)); } catch (Exception e) { return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message)); } }
public Condominium Patch([FromBody] Condominium condominium) { return(CondominiumService.Update(condominium)); }
public Condominium Post([FromBody] Condominium condominium) { return(CondominiumService.Create(condominium)); }
public Condominium Get([FromRoute] int id) { return(CondominiumService.Get(id)); }
public CondominiumController(CondominiumService condominiumService, AccountingService accountingService) { CondominiumService = condominiumService; AccountingService = accountingService; }