Skip to content

Commit f418240

Browse files
author
breno.dev
committed
Modificação de Bugs
1 parent cb8d660 commit f418240

File tree

2 files changed

+6
-30
lines changed

2 files changed

+6
-30
lines changed

SalesWebMvc/Data/SeedingService.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
<<<<<<< HEAD
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Threading.Tasks;
61
using SalesWebMvc.Models;
7-
=======
8-
using SalesWebMvc.Models;
92
using SalesWebMvc.Models.Enums;
103
using System;
114
using System.Linq;
12-
>>>>>>> 6c314c3999929039513af22d29fbd84183a8d758
135

146
namespace SalesWebMvc.Data
157
{
@@ -28,22 +20,13 @@ public void Seed()
2820
_context.Seller.Any() ||
2921
_context.SalesRecord.Any())
3022
{
31-
<<<<<<< HEAD
32-
return; //DB has been seeded
33-
=======
3423
return; // DB has been seeded
35-
>>>>>>> 6c314c3999929039513af22d29fbd84183a8d758
3624
}
3725

3826
Department d1 = new Department(1, "Computers");
3927
Department d2 = new Department(2, "Electronics");
4028
Department d3 = new Department(3, "Fashion");
4129
Department d4 = new Department(4, "Books");
42-
<<<<<<< HEAD
43-
Department d5 = new Department(5, "Games");
44-
45-
=======
46-
>>>>>>> 6c314c3999929039513af22d29fbd84183a8d758
4730

4831
Seller s1 = new Seller(1, "Bob Brown", "[email protected]", new DateTime(1998, 4, 21), 1000.0, d1);
4932
Seller s2 = new Seller(2, "Maria Green", "[email protected]", new DateTime(1979, 12, 31), 3500.0, d2);
@@ -84,9 +67,6 @@ public void Seed()
8467
SalesRecord r30 = new SalesRecord(30, new DateTime(2018, 10, 12), 5000.0, SaleStatus.Billed, s2);
8568

8669

87-
<<<<<<< HEAD
88-
}
89-
=======
9070
_context.Department.AddRange(d1, d2, d3, d4);
9171

9272
_context.Seller.AddRange(s1, s2, s3, s4, s5, s6);
@@ -101,6 +81,5 @@ public void Seed()
10181

10282
}
10383

104-
>>>>>>> 6c314c3999929039513af22d29fbd84183a8d758
10584
}
106-
}
85+
}

SalesWebMvc/Startup.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
using Microsoft.EntityFrameworkCore;
1313
using SalesWebMvc.Models;
1414
using SalesWebMvc.Data;
15-
<<<<<<< HEAD
16-
=======
1715
using SalesWebMvc.Services;
18-
>>>>>>> 6c314c3999929039513af22d29fbd84183a8d758
16+
1917

2018
namespace SalesWebMvc
2119
{
@@ -42,15 +40,14 @@ public void ConfigureServices(IServiceCollection services)
4240
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
4341

4442
services.AddDbContext<SalesWebMvcContext>(options =>
45-
options.UseMySql(Configuration.GetConnectionString("SalesWebMvcContext"), builder =>
43+
options.UseMySql(Configuration.GetConnectionString("SalesWebMvcContext"), builder =>
4644
builder.MigrationsAssembly("SalesWebMvc")));
4745

4846
services.AddScoped<SeedingService>();
49-
<<<<<<< HEAD
50-
=======
47+
5148
services.AddScoped<SellerService>();
5249
services.AddScoped<DepartmentService>();
53-
>>>>>>> 6c314c3999929039513af22d29fbd84183a8d758
50+
5451
}
5552

5653
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -79,4 +76,4 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, SeedingS
7976
});
8077
}
8178
}
82-
}
79+
}

0 commit comments

Comments
 (0)