i am trying to build a plugin with data accesses to nop3.2
now it seems that i cant preform the inset and i cannot find why.
i tried try catch but didnt goy any err .
plz assist...
record map :
public partial class EtsyOauthRecordMap : EntityTypeConfiguration<EtsyOauthRecord>
{
public EtsyOauthRecordMap()
{
ToTable("EtsyOauth");
HasKey(x => x.Id);
/* Property(x => x.StoreName);
Property(x=>x.oauth_token);
Property(x=>x.shared_secret);
Property(x=>x.permanent_token);
Property(x => x.permanent_secret); */
}
}
record :
public partial class EtsyOauthRecord : BaseEntity
{
/* public int EtsyOauthId { get; set; }*/
public string StoreName { get; set; }
public string oauth_token { get; set; }
public string shared_secret { get; set; }
public string permanent_token { get; set; }
public string permanent_secret { get; set; }
}
controller :
public ActionResult Auth()
{
string oauth_token;
string oauth_token_secret;
var model = new EtsyModel();
var portal = new Etsy_portal("xxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxx");
model.ConfirmUrl = portal.GetConfirmUrl(out oauth_token, out oauth_token_secret, null);
var outhRecord = new EtsyOauthRecord();
outhRecord.StoreName = "mitpachat.com";
outhRecord.oauth_token = oauth_token;
outhRecord.shared_secret = oauth_token_secret;
_EtsyOauthService.InsertEtsyOauthRecord(outhRecord);
return View("Main" ,model);
}
service :
public virtual void InsertEtsyOauthRecord(EtsyOauthRecord EtsyOauthRecord)
{
if (EtsyOauthRecord == null)
throw new ArgumentNullException("EtsyOauthRecord");
_gpRepository.Insert(EtsyOauthRecord);
}