Why is MyCompany.MyProject.Web.Host not set as SetAsStartUp by default when we download the project. Is there any reason behind it? because Every time we download we need to set it.
@Aaron,
Thanks for your help always.
I have tried the steps provided by you, Its working fine for Insert records. But it's giving error while updating and deleting records.
ERROR 2018-02-12 06:13:23,049 [30 ] Mvc.ExceptionHandling.AbpExceptionFilter - An error occurred while updating the entries. See the inner exception for details. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Cannot update identity column 'Id'.
public async Task UpdateTest()
{
var entity = GetAll().Where(x => x.TestId == "One").FirstOrDefault();
await UpdateAsync(entity);
}
public async Task DeleteTest()
{
await DeleteAsync(x => x.TestId == "One");
}
public class Test : FullAuditedEntity
{
// PK
public string TestId { get; set; }
// Unique constraint
public int TestId2 { get; set; }
}
public class TestRepository : MyCompanyRepositoryBase<Test, int>, ITestRepository
{
private readonly IActiveTransactionProvider _transactionProvider;
public TestRepository(IDbContextProvider<MyCompanyDbContext> dbContextProvider,
IObjectMapper objectMapper)
: base(dbContextProvider, objectMapper)
{
}
public TestRepository(IDbContextProvider<MyCompanyDbContext> dbContextProvider, IActiveTransactionProvider transactionProvider,
IObjectMapper objectMapper)
: base(dbContextProvider, objectMapper)
{
_transactionProvider = transactionProvider;
}
public async Task CreateTest()
{
await InsertAsync(new Test
{
TestId = "One",
TestId2 = 1
});
}
public async Task DeleteTest()
{
await DeleteAsync(x => x.TestId == "One");
}
public Task GetSearchTest()
{
throw new NotImplementedException();
}
public Test GetTest()
{
throw new NotImplementedException();
}
public Test GetTestDetailsforEdit()
{
return GetAll().Where(x => x.TestId == "One").FirstOrDefault();
}
public async Task UpdateTest()
{
var entity = GetAll().Where(x => x.TestId == "One").FirstOrDefault();
await UpdateAsync(entity);
}
}
I'm trying to select Tab2 by default, But it's not working correctly, It's selecting both tabs. I can see Hello and World on screen.
<p-tabView>
<p-tabPanel header="Tab1">
Hello
</p-tabPanel>
<p-tabPanel header="Tab2" [selected]="true">
World
</p-tabPanel>
</p-tabView>
I'm using primeng version 4.1.2.
Reference: <a class="postlink" href="https://www.primefaces.org/primeng/#/tabview">https://www.primefaces.org/primeng/#/tabview</a>
SO again I’ll ask the sameness question.
Test cases which are there in the downloaded project are unit tests or integration tests? And why?
MY question is still unanswered.
@BBakerMMC and @strix20
So what do you suggest?
Could you please explain with some code example or sample.
Test cases which are there in the downloaded project are unit tests or integration tests? And why?
I’m creating some records, test case is passed successfully, but I cannot see in the database? So if I want to run these test cases on real DB, how can I do this?
If running test cases are allowed on real db then how should I handle the cleanup code? Means if let’s say I’m running test case to insert a row for entity, but once I’m done with this test case, it should remove this records from DB. Same should happen for update and delete also.
I’m using asp.net core + angular project.
Could you please provide documentation related to RAD tool. What’s it is? What it does? How to use it? How is this useful? Pleas provide some practical examples and sample if possible.
Awesome, Thanks a lot
create an empty migration, then copy the "Up" and "Down" in the 56th migration into the opposite ("Down" and "Up") of the new migration
Thanks for this tip, You rock
I have added around 100 migrations using Add-Migration in Package Manager Console and run Update-DataBase. Now I want to remove let's say 56th number migration. I have not found any way to do this. EF Core allows me to remove migrations sequences only, which is I think correct. because If I remove an in-between migration, later migration might fail due to dependency on old migrations. But If there is no dependency it should allow me to remove or disable.
I know my question can be invalid, But I'm asking just for the curiosity.