Esempio n. 1
0
        public async Task <int> Create(ProductAttributeTypesParameters data)
        {
            var dbparams = new DynamicParameters();

            dbparams.Add("AttributeName", data.AttributeName, DbType.String);

            var result = await Task.FromResult(_dapper.Insert <int>("[dbo].[p_CreateAttributes]"
                                                                    , dbparams,
                                                                    commandType: CommandType.StoredProcedure));

            return(result);
        }
Esempio n. 2
0
        public Task <int> Update(int Id, ProductAttributeTypesParameters data)
        {
            var dbParams = new DynamicParameters();

            dbParams.Add("Id", Id);
            var dbparams = new DynamicParameters();

            dbparams.Add("AttributeName", data.AttributeName, DbType.String);

            var updateProductAttributeTypes = Task.FromResult(_dapper.Update <int>("[dbo].[p_UpdateAttributes]",
                                                                                   dbParams,
                                                                                   commandType: CommandType.StoredProcedure));

            return(updateProductAttributeTypes);
        }