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); } }
// 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); }
// 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); }
public async Task <T> CreateAsync(T model, Guid guid) { await _repo.Add(model, guid); return(model); }