Exemple #1
0
        public async Task AddTest()
        {
            Interns interns = new Interns()
            {
                id          = Guid.NewGuid(),
                NameSurname = "Ali Zorlu",
                AddTime     = DateTime.Now
            };

            try
            {
                await repo.Add(interns, interns.id);
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }
        }
Exemple #2
0
 // POST api/values
 public async Task PostAsync([FromBody] Post user)//BURDA KALDIM(REPO2 OLUSTURDUM POST ICIN DENEDIM EKLEDI FIREA)
 {
     //Location loc = new Location {
     //    City = "Elazığ",
     //    Country = "Turkey",
     //    Lan = "123",
     //    Lat = "23"
     //};
     //Guid registerGuid = Guid.NewGuid();
     //User user = new User()
     //{
     //    id = registerGuid,
     //    DeviceId = value,
     //    Location = loc,
     //    PhoneNumber = "852654"
     //};
     await repo2.Add(user, user.id);
 }
Exemple #3
0
 // POST api/values
 public async Task PostAsync([FromBody] User user)
 {
     //Location loc = new Location {
     //    City = "Elazığ",
     //    Country = "Turkey",
     //    Lan = "123",
     //    Lat = "23"
     //};
     //Guid registerGuid = Guid.NewGuid();
     //User user = new User()
     //{
     //    id = registerGuid,
     //    DeviceId = value,
     //    Location = loc,
     //    PhoneNumber = "852654"
     //};
     await repo.Add(user, user.id);
 }
Exemple #4
0
        public async Task <T> CreateAsync(T model, Guid guid)
        {
            await _repo.Add(model, guid);

            return(model);
        }