public string Update(CorretorEntity corretor) { try { _repository.Update(corretor); return("Dados atualizados com suscesso !!!"); } catch (Exception ex) { return(ex.Message); } }
public string Add(CorretorEntity corretor) { try { corretor.Cadastro = DateTime.Now.Date; _repository.Add(corretor); return("Corretor adicionado com suscesso !!!"); } catch (Exception ex) { return(ex.Message); } }
public JsonResult Remove(CorretorEntity corretor) { string _token = ""; var header = Request.Headers; _token = header["token-corretor"]; if (!_token.Equals(_tokenapi)) { return(Json("Token invalido")); } CorretorBusiness busines = new CorretorBusiness(); return(Json(busines.Remove(corretor))); }
public bool Existe(CorretorEntity corretor) { return(_repository.Existe(corretor)); }