This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$customerModel = Mage::getModel('customer/customer'); | |
$addressModel = Mage::getModel('customer/address'); | |
foreach ($customerIdList as $customerId) { | |
$customer = NULL; | |
$customer = $customerModel->load($customerId); | |
$billing = $addressModel->load($customer->getDefaultBilling()); | |
Mage::log($billing); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deleteme: | |
cloud.present: | |
- cloud_provider: do | |
- image: ubuntu-14-04-x64 | |
- size: 512MB | |
- name: testcomputer | |
- location: nyc3 | |
- grains: | |
roles: | |
- rproxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXECUTE sp_rename @objname = N'dbo.AspNetRoles', @newname = N'IdentityRoles', @objtype = N'OBJECT' | |
IF object_id('[PK_dbo.AspNetRoles]') IS NOT NULL BEGIN | |
EXECUTE sp_rename @objname = N'[PK_dbo.AspNetRoles]', @newname = N'PK_dbo.IdentityRoles', @objtype = N'OBJECT' | |
END | |
Caution: Changing any part of an object name could break scripts and stored procedures. | |
Caution: Changing any part of an object name could break scripts and stored procedures. | |
EXECUTE sp_rename @objname = N'dbo.AspNetUserRoles', @newname = N'IdentityUserRoles', @objtype = N'OBJECT' | |
IF object_id('[PK_dbo.AspNetUserRoles]') IS NOT NULL BEGIN | |
EXECUTE sp_rename @objname = N'[PK_dbo.AspNetUserRoles]', @newname = N'PK_dbo.IdentityUserRoles', @objtype = N'OBJECT' | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modelBuilder.Entity<IdentityUserLogin>().HasKey<string>(l => l.UserId); | |
modelBuilder.Entity<IdentityRole>().HasKey<string>(r => r.Id); | |
modelBuilder.Entity<IdentityUserRole>().HasKey(r => new { r.RoleId, r.UserId }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('authInterceptor', function($q, Auth) { | |
return { | |
request: function (config, req) { | |
if (req.url.indexOf('/myauthurl') !== -1) { | |
var deferred = $q.defer(); | |
if (Auth.authz.token) { | |
console.log("entro") | |
Auth.authz.updateToken(5).success(function() { | |
config.headers = config.headers || {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Table("Answers")] | |
public class Answer | |
{ | |
[Key,Column(Order = 0)] | |
public int AnswerId { get; set; } | |
[Key, Column(Order = 1)] | |
public virtual Question Question { get; set; } | |
public virtual Project Project { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations.Schema; | |
using System.Linq; | |
using System.Web; | |
using System.Data.Entity.Infrastructure; | |
using System.ComponentModel.DataAnnotations; | |
namespace EDGWebApi.Models | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Initial Migration | |
public class Product | |
{ | |
public int Id { get; set; } | |
public int UserId { get; set; } | |
} | |
//Updated Model | |
public class Product |