Exemplo n.º 1
0
        public async Task <StateMaster> CreateAsync(StateMaster entity)
        {
            try
            {
                var res = await ctx.StateMaster.AddAsync(entity);

                await ctx.SaveChangesAsync();

                return(res.Entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public async Task <UserMaster> CreateAsync(UserMaster entity)
        {
            try
            {
                entity.UserMasterId = Guid.NewGuid().ToString();
                var res = await ctx.UserMaster.AddAsync(entity);

                await ctx.SaveChangesAsync();

                return(res.Entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }