Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "mgarcia"

Can we talk by Skype?

hi! it seems that link is broken.

Are tenants able to config their own email account?

The user was logged in host.

Hi!

I have a site running on app services in azure, I just noticed a problem that is giving me firefox right now. So I tried to replicate it in PostMan and got the same response 401 unauthorized.

So let see if you can help me because on Chrome everything is working ok.

I make an auth token request

then I copied the access token to post request to create an order.

At first I though it was an CORS problem, but everything works ok in Chrome on productive enviroment.

I event tried this using Swagger, so I logged in, tried the method on swagger and everything works fine. Copy the same access token and tried on postman but got the same error:

Postman:

Do you have an idea why is this happening?

thx so much.

Hi!

Im having an issue, my code is working but im thinking in long terms.

Right now I have this method:

        private async Task<bool> ValidateRecurrentEventExecution()
        {
            try
            {
                var recurrentEventsExecutions = await _recurrentEventExecution.GetAllListAsync();
                foreach (var recurrentEventsExecution in recurrentEventsExecutions)
                {
                    if (DateTimeToString(recurrentEventsExecution.StartDate) == DateTimeToString(DateTime.Now))
                        return true;
                }

                return false;
            }
            catch (Exception e)
            {

                throw e;
            }
        }

And everything works fine but when in a few months or year this could return a lot of items in the list.

var recurrentEventsExecutions = await _recurrentEventExecution.GetAllListAsync();

So Im trying to do something like:

var recurrentEventsExecutions = await _recurrentEventExecution.GetAllListAsync().orderByDecending(x => x.Id).take(20);

But IRepository doesn have this methods

namespace Abp.Domain.Repositories
{
    public interface IRepository<TEntity, TPrimaryKey> : IRepository, ITransientDependency where TEntity : class, IEntity<TPrimaryKey>
    {
        int Count();
        int Count(Expression<Func<TEntity, bool>> predicate);
        Task<int> CountAsync(Expression<Func<TEntity, bool>> predicate);
        Task<int> CountAsync();
        void Delete(TEntity entity);
        void Delete(TPrimaryKey id);
        void Delete(Expression<Func<TEntity, bool>> predicate);
        Task DeleteAsync(TPrimaryKey id);
        Task DeleteAsync(Expression<Func<TEntity, bool>> predicate);
        Task DeleteAsync(TEntity entity);
        TEntity FirstOrDefault(Expression<Func<TEntity, bool>> predicate);
        TEntity FirstOrDefault(TPrimaryKey id);
        Task<TEntity> FirstOrDefaultAsync(Expression<Func<TEntity, bool>> predicate);
        Task<TEntity> FirstOrDefaultAsync(TPrimaryKey id);
        TEntity Get(TPrimaryKey id);
        IQueryable<TEntity> GetAll();
        IQueryable<TEntity> GetAllIncluding(params Expression<Func<TEntity, object>>[] propertySelectors);
        List<TEntity> GetAllList(Expression<Func<TEntity, bool>> predicate);
        List<TEntity> GetAllList();
        Task<List<TEntity>> GetAllListAsync(Expression<Func<TEntity, bool>> predicate);
        Task<List<TEntity>> GetAllListAsync();
        Task<TEntity> GetAsync(TPrimaryKey id);
        TEntity Insert(TEntity entity);
        TPrimaryKey InsertAndGetId(TEntity entity);
        Task<TPrimaryKey> InsertAndGetIdAsync(TEntity entity);
        Task<TEntity> InsertAsync(TEntity entity);
        TEntity InsertOrUpdate(TEntity entity);
        TPrimaryKey InsertOrUpdateAndGetId(TEntity entity);
        Task<TPrimaryKey> InsertOrUpdateAndGetIdAsync(TEntity entity);
        Task<TEntity> InsertOrUpdateAsync(TEntity entity);
        TEntity Load(TPrimaryKey id);
        long LongCount(Expression<Func<TEntity, bool>> predicate);
        long LongCount();
        Task<long> LongCountAsync();
        Task<long> LongCountAsync(Expression<Func<TEntity, bool>> predicate);
        T Query<T>(Func<IQueryable<TEntity>, T> queryMethod);
        TEntity Single(Expression<Func<TEntity, bool>> predicate);
        Task<TEntity> SingleAsync(Expression<Func<TEntity, bool>> predicate);
        TEntity Update(TEntity entity);
        TEntity Update(TPrimaryKey id, Action<TEntity> updateAction);
        Task<TEntity> UpdateAsync(TPrimaryKey id, Func<TEntity, Task> updateAction);
        Task<TEntity> UpdateAsync(TEntity entity);
    }
}

Each time I deploy in release got to update appsettings.production.json manually.

User user = null;
using (var t = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions  
            { IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted}))
{
    {
        user = await UserManager.GetUserByIdAsync(input.UserId);
    }
}

Im trying to make an scope for some Read uncommitted values I need. But I get this error "An ambient transaction has been detected. The ambient transaction needs to be completed before beginning a transaction on this connection." How can I apply some dirty read in web api core 2 project?

Just fix it :) thx.

Showing 11 to 20 of 41 entries