-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathProcessUnInstalled
More file actions
21 lines (16 loc) · 812 Bytes
/
ProcessUnInstalled
File metadata and controls
21 lines (16 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
private void ProcessUnInstalled(string jsonData)
{
using (var con = new FulfillmentDbEntities())
{
var json = JsonConvert.DeserializeObject<dynamic>(jsonData);
string domain = json.domain.ToString();
string myshopify_domain = json.myshopify_domain.ToString();
if (con.ShopTokens.Any(c => c.Shop == domain) || con.ShopTokens.Any(c=>c.Shop == myshopify_domain))
{
var updateRow = con.ShopTokens.FirstOrDefault(c => c.Shop == domain);
updateRow.UninstallDate = DateTime.Now;
updateRow.Token = "";
con.SaveChanges();
}
}
}