Beispiel #1
0
        public async Task <ProfissionalFavorito> SaveAsync(ProfissionalFavorito entity, string token)
        {
            try
            {
                if (await SeguracaServ.ValidaTokenAsync(token))
                {
                    if (_profissionalFavoritoRep.GetSingle(x => x.ProfissionalId == entity.ProfissionalId && x.IdEmpresa == entity.IdEmpresa && x.IdCliente == entity.IdCliente) == null)
                    {
                        entity.ID = _profissionalFavoritoRep.Add(entity);
                    }
                    return(entity);
                }
                else
                {
                    throw new Exception("Token inválido!");
                }

                return(default);
Beispiel #2
0
 public Task RemoveAsync(ProfissionalFavorito entity, string token)
 {
     throw new NotImplementedException();
 }