public async Task <IHttpActionResult> GetPhoneTypeMaster(Guid id) { var data = await _PhoneTypeService.GetById(id); if (data.Id == null) { return(NotFound()); } return(Ok(data)); }
public void GetById_Test() { // Arrange TestKolgraphEntities context = new TestKolgraphEntities(); var repository = new PhoneTypeRepository(context); var service = new PhoneTypeService(repository); int id = 1; // Act PhoneTypeModel result = service.GetById(id); // Assert Assert.IsNotNull(result); Assert.AreEqual(id, result.Id); }