I have a repository for create, edit, delete table below.
public class OrmLiteCompanyRepository : OrmLiteCompanyRepository<Company, CompanySetting, CompanyView>
{
public OrmLiteCompanyRepository(IDbConnectionFactory dbFactory) : base(dbFactory) { }
public OrmLiteCompanyRepository(IDbConnectionFactory dbFactory, string namedConnnection = null)
: base(dbFactory, namedConnnection) { }
}
public class OrmLiteCompanyRepository<TCompany, TCompanySetting, TCompanyView> : OrmLiteBaseRepository, ICompanyRepository, IRequiresSchema, IClearable
where TCompany : class, ICompany
where TCompanySetting : class, ICompanySetting
where TCompanyView : class, ICompanyView
{
Company Type:
[Alias("tbl_Company")]
public class Company : ICompany
{
[AutoIncrement]
[PrimaryKey]
public int Id { get; set; }
public int Type { get; set; }
[StringLength(128)]
public string Code { get; set; }
Where create new company, i call:
db.Save((TCompany)newCompany);
BUT when i retrieve Id then newCompany.Id == 1 always
It’s error when i upgrade to SS 4.5.10 and 4.5.12.
Any bug here?