This is My Store
Ext.define('Movie.store.CartStore', {
extend: 'Ext.data.Store',
alias: 'store.cart',
storeId: 'cartStore',
requires: [
'Movie.model.CartModel'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: true,
autoSync: true,
model: 'Movie.model.CartModel',
remoteSort: true,
proxy: {
type: 'rest',
enablePaging: true,
api: {
create: 'https://localhost:44369/Movies/AddCart',
read: 'https://localhost:44369/Movies/GetCart',
update: 'https://localhost:44369/Movies/EditCart',
destroy: 'https://localhost:44369/Movies/DeleteCart'
},
reader: {
type: 'json',
headers: { 'Accept': 'application/json' }
},
writer: {
type: 'json',
}
}
}, cfg)]);
}
});
My Model
Ext.define('Movie.model.CartModel', {
extend: 'Movie.model.Base',
idProperty:'Id',
uses: [
'Movie.model.UsersModel'
],
fields: [
{ name: 'Id', type: 'int' , persist: false},
{ name: 'userid', type: 'int' },
{ name: 'name', type: 'string' },
{ name: 'moviename', type: 'string' },
{ name: 'address', type: 'string' },
{ name: 'price', type: 'int' },
{ name: 'rentday', type: 'string' },
{ name: 'url', type: 'string' },
]
});
Web APi Req..
[Route("Movies/GetCart/{id}")]
[HttpGet]
[EnableCors("*", "*", "*")]
public IHttpActionResult GetCart(int? id)
{
using (var ctx = new MyEntity())
{
var data = from cus in db.Users
from mov in db.Movie
from cart in db.Movie_cart
where cus.CustomerId ==cart.CustomerId && mov.Movie_id ==cart.Movie_Id && cus.CustomerId == id
select new
{
Id = cart.Cart_id,
userid = cus.CustomerId,
name = cus.Fname,
moviename = mov.Movie_name,
address = cus.Address,
price = mov.Movie_price,
rentday = mov.Rent_day,
url = mov.Movie_url
};
return Ok(data);
}
}
So I want to Pass Ide to My rest Proxy Url SOmething Like This
https://localhost:44369/Movies/GetCart/123
I dont not have have any Idea Ill Try using
extraParams:{
id:123
}
and Disable appendId: false But not solve my issue it returns
https://localhost:44369/Movies/GetCart?dc_23213124124124&id=123 instead of https://localhost:44369/Movies/GetCart/123